Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I prevent Visual Studio 2012 Find in Files defaulting to "Current Document"?

In Visual Studio 2010 and earlier, the Find in Files feature remembered your selection for the "Look in" option.

In 2012, the option sometimes gets reset to "Current Document", making it only search in a single file. This can be annoying, particularly when you don't notice it's done it.

Is there any way I can force this setting to stick with what I want it to be (generally "Entire Solution")?

As an example of the problem, highlight a few lines of text in a source file and bring up the Find in Files box. It will have changed the "Look In" setting to "Selection". Close it, deselect the text and do Find in Files again. The setting will have silently reverted to "Current Document". Doing this in 2010 and earlier doesn't change the setting.

There's another description of the problem here.

like image 465
James Sutherland Avatar asked Nov 13 '12 15:11

James Sutherland


People also ask

How do I search for a word in all files in Visual Studio?

The new experience is available by searching for “Find in Files” or “Replace in Files” in Visual Studio search (Ctrl+Q by default). You can also get to these commands with Ctrl+Shift+F and Ctrl+Shift+H respectively.

How do I choose which file to debug in Visual Studio?

In Solution Explorer, right-click the project and choose Properties. In the side pane, choose Build (or Compile in Visual Basic). In the Configuration list at the top, choose Debug or Release. Select the Advanced button (or the Advanced Compile Options button in Visual Basic).

How do I search for a file in Visual Studio?

Find in Files allows you to search a specified set of files. The matches Visual Studio finds are listed in the Find Results window in the IDE. How the results appear depends on the options you choose on the Find in Files tab of the Find and Replace dialog box.

How do I search an entire solution in Visual Studio?

Ctrl + Shift + F – Find in Solution Sometimes you want to search across your entire solution. You can double-click each item in the “Find Results” window to navigate to that instance of the search term you searched for.


1 Answers

I find that its intermittent (but more often that not) and that its a potential bug. For me it resets to "All Open Documents" which could be far more disastrous.

Do you have any plugins installed as I was thinking of raising this as an issue with vs if its not a 3rd party tool affecting it?

I have the following installed:

  • Resharper 7.1
  • Teamcity
  • Ankh
  • Entity Framework Power Tools Beta 2
  • Ghost Doc
  • Microsoft Web Developer Tools
  • NestIn
  • NuGet
  • Spell Chekcer
  • SQL Server Compact Toolbox
  • VS Extensions for Windows Library JavaScript

I guess we should rule out some of these first?

Anyone else find this who has no extensions installed?

like image 112
Dewy Avatar answered Sep 17 '22 13:09

Dewy