3

I'm using Visual Studio 2010. I'm in a project, in the solution explorer, in the fr directory (as opposed to en directory for english). I want to find all instances of the string ~/en/ and replace them with ~/fr/.

When I use VS's "Find and Replace" feature, the "Look In" drop down only offers Entire Solution and Current Project. It would be nice if it had a "Look in: Specify Folder" option. How do I achieve this?

6 Answers 6

5

You've got it. "Find and Replace" (Ctrl+Shift+F), instead of clicking Entire Solution, click the ellipsis (...) on the right hand side of this dropdown. You can select any directory/path.

1
  • there is no (...) for the Quick Replace functionality. That's only for the Find In Files functionality. May 1, 2011 at 16:10
2

In the "Find and Replace" dialog select "Replace in Files" option from the menu bar, instead of the default option which is "Quick Replace"

0

This is pathetic, but what I ended up doing was creating a new VS project. Then I copied the fr directory from the previous project into the new VS Project. Used a Quick Replace on Entire Solution. Then I copied the fr folder back into my previous project.

This is a bad work around...but it works. I hope someone can offer a better solution.

0

All you need to do is to click on Find and Replace in the Edit toolbar of Visual Studio. Then you need to select Replace in Files.

According to where you need to make the change, you can select one of the below:

  • Current Document.
  • All open documents.
  • Entire Solution meaning all the projects in the current solution.
  • Current Project meaning all the files in the current project.
  • Entire Solution (including external items) meaning all the projects in the current solution, including any referenced items.
  • Current Project (including external items) meaning all the files in the current project, including any referenced items.
0

Find and Replace (Ctrl+Shift+F) and in Look in: select "..." sign to carefully select particular project folder from directory structure.

0

Simple, Download the tool "Open All Documents in Folder" from visual studio tools... then open all documents with one click. Then, By using Search and replace or Multiple line search and replace tool you can change by selecting : all opened documents...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.