Walter Stabosz
Walter Stabosz

Reputation: 7735

VS2010 "Look at these file types" option keeps resetting to previous value

One day, in VS2010, I was using the "Find in Files" tool.

I set the "Look at these file types" option to *.sql. Ever since then, when I bring up the tool, it will randomly default the file type to either *.sql, or blank. I want it to always default to blank.

The "bug" happens across different solutions.

Does anyone know why it's randomly resetting to *.sql and how I can get it to stop?

Upvotes: 46

Views: 4786

Answers (4)

Greg
Greg

Reputation: 186

This happens in Visual Studio 2017 as well, and I can't find the registry to clear. My workaround is to set the file type to *.* instead of clearing it.

Upvotes: 15

ChiokJarse
ChiokJarse

Reputation: 101

Visual Studio has the "feature" of storing this information in the registry. You can change the registry manually, but since we need to change the registry after every filtered search, it is useful to have a .reg file to do it.

Save as 'Reset Search in Visual Studio.reg':

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\Find]
"Query"="Entire Solution"
"Filter"=""
"Filter 0"=""

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\Find]
"Query"="Entire Solution"
"Filter"=""
"Filter 0"=""

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Find]
"Query"="Entire Solution"
"Filter"=""
"Filter 0"=""

Upvotes: 7

Walter Stabosz
Walter Stabosz

Reputation: 7735

Duh, change the filter to * and Visual Studio will remember it and it will perform an unfiltered search. Not sure why I didn't think of it sooner.

Upvotes: 31

user1330109
user1330109

Reputation:

I'm not sure why it's behaving randomly. My VS2010 always uses the last file filter I entered, although unfortunately it won't seem to remember me clearing out the option.

To revert it back to blank, use regedit.exe and navigate to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Find. Edit the value named "Filter" and set the data to blank.

Next time you change it to *.sql, though, Visual Studio will store it and remember it.

Upvotes: 51

Related Questions