Visual Studio “Find” results in “No files were fou

2019-01-21 02:47发布

Sometimes while developing in Visual Studio IDE, when you use "Find in Files" dialog to find something, the search fails and you will see the following message in the "Find Results" window.

No files were found to look in. Find stopped progress

Once this message shows up, all the subsequent searches will result in the same message. Nothing fixes the problem including restarting the computer except pressing Ctrl + ScrLk.

What causes Visual Studio to get into this state and is there a setting to permanently prevent it from happening?

14条回答
Summer. ? 凉城
2楼-- · 2019-01-21 03:34

I have had this problem and saw peoples' answers about the multiple Ctrl + Break/Pause Scroll Lock combinations.

I considered this, but I thought it a poor workaround (especially as I use a Mac Keyboard so those keys are not easily available).

So the solution I found was to do this:

  1. Menu: ToolsOptionsEnvironmentFind and Replace

  2. Uncheck the top three check boxes (checked by default in my settings).

  3. Re-check the top three check boxes.

Et voila, everything should work fine.

Well, it did for me anyway, which was a relief as I can't believe Microsoft would allow a weird key combination as a work around for a bug like this.

I submit this hoping it may help!

查看更多
叼着烟拽天下
3楼-- · 2019-01-21 03:36

Apparently, for those for who the key combinations don't work (like me at the moment), deleting the following registry key brings salvation:

MyComputer\HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\[VS VERSION NUMBER]\Find

Of course, [VS VERSION NUMBER] should be internal version number of the IDE. Don't forget to restart your computer.

Mind you, deleting stuff in the registry is dangerous. Like anyone on SO cares but anyway...

查看更多
相关推荐>>
4楼-- · 2019-01-21 03:36

I had this in Visual Studio 2015 yesterday.

In Find in Files, in the textfield Look in:, I typed

*.*

instead of Entire Solution, and that also caused No files were found to look in.

查看更多
我只想做你的唯一
5楼-- · 2019-01-21 03:38

See if this Stack Overflow question helps:

Search stops working for "Entire Solution"

Short version of the solution:

You should try clicking inside the Find Results window, and once the blinking text cursor is visible, hit Ctrl + Break four or five times. That should do the trick.

查看更多
Anthone
6楼-- · 2019-01-21 03:39

I thought I was seeing this problem, but after two days of searching for a solution I figured out that the "Look at these file types" selector had changed and didn't include the file extension I needed.

查看更多
Animai°情兽
7楼-- · 2019-01-21 03:39

This is not a Visual Studio bug or Windows bug. It's a keyboard bug. Please see an answer in duplicate question https://stackoverflow.com/a/28219093/147805.

查看更多
登录 后发表回答