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条回答
戒情不戒烟
2楼-- · 2019-01-21 03:39

I encountered a very similar problem. I was searching a folder for all files for a phrase in all .cs files in my solution. Visual Studio kept saying "No files were found to look in". (It did not have the "Find stopped progress" part of the message.)

I searched for the message and found this question. The suggested keyboard commands in other answers did not work.

I like to use the keyboard for navigation. I had accidentally hit Alt+B and Space. Alt+B is the shortcut to jump to the "Include sub-folders" checkbox on the Find and Replace form. The space bar cleared the checkbox, and then Alt+A performed a Find All action. Because it was not searching sub-folders, no files were found. The message was correct.

After checking the "Include sub-folders" box, searches found the matching files in sub-folders. So if you're getting the message "No files were found to look in" without the message "Find stopped progress", ensure the search is looking in sub-folders!

查看更多
我欲成王,谁敢阻挡
3楼-- · 2019-01-21 03:49

I can reproduce your issue.

There are some steps as following below you can try:

  1. Check the setting Find and Replace (menu ToolsEnvironmentFind and Replace).
  2. Open "Developer Command Prompt for VS2013" and paste “devenv.exe /resetsettings”

  3. Use the Visual Studio Setup Wizard (via Control Panel) to repair Visual Studio. You also can read the reference about Find in Files:

    http://msdn.microsoft.com/en-us/library/dechx2tz.aspx

查看更多
登录 后发表回答