Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 Find in Files not remembering file types or locations

I rely on the Find in Files dialog in Visual Studio a great deal. (Sometimes Intellisense/Resharper just don't cut it.) Since upgrading to 2015, I've noticed that the dialog doesn't remember my custom "Look in" paths or "Look at these file types" lists between sessions.

If I close my solution and VS instance, then reopen, I have to enter my custom path and file types again. Huge waste of time. Has anyone run else run into this? Any workaround? 2013 used to remember this stuff.

Microsoft Visual Studio Professional 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081
Installed Version: Professional
like image 796
Jordan Rieger Avatar asked Aug 12 '15 16:08

Jordan Rieger


People also ask

How do I search inside 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 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've never had any problems with it not remembering my settings, but I imagine that you could run a custom registry modifier to add the appropriate keys, you could make sure your settings are always pristine. The custom search information is stored in HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0\Find.

The file types are stored in a string key called Filter with whatever you would normally input into the custom file type category in the VS search window. For example searching for only .cs and .txt files you would put *.cs;*.txt.

The folders are located in a string key called Query with values such as C:\Folder1;C:\Folder2. However, it's behavior seems a little weird. You have change the value of Query and a Query+integer value (i.e. Query0) to the same value to have it appear in Visual Studio.

If you just run a script to modify the above values to the files types/folder locations you want, that should work.

like image 66
Ringil Avatar answered Oct 11 '22 00:10

Ringil