ChatGPT解决这个技术问题 Extra ChatGPT

Visual Studio "Find" results in "No files were found to look in. Find stopped progress."

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?

Can you add more details please? What are you searching for and why?
I don't understand the question or the solution. Please elaborate.
It seems that in VS2008, you may need to use Alt instead of Ctrl. See also: vidmar.net/weblog/archive/2007/04/17/…
This just happened to me with VS2008. I had had a VS crash earlier but had restarted VS. The Ctrl + ScrLk appears to work - thanks!

R
Ray

According to this thread :

Posted by Microsoft on 10/13/2009 at 4:33 PM Hi all, Thank you for your continued interest in this bug. We have been able to reproduce the issue intermittently in several versions of Visual Studio running on several versions of Windows and have identified the root cause as external to VS. The Windows team unfortunately did not have time to fix this for their current release, but we are working with them to hopefully have this bug fixed for a future version of Windows. At present, the workaround (as many of you noted) is to press Ctrl+Scroll Lock, Ctrl+Break, or the Break key alone. Again, thanks for all of the details you provided about this bug. If you have any further questions or comments, please feel free to post again here; although this issue was closed quite a while ago, I'll make sure it stays on our radar. Thanks, Brittany Behrens Program Manager, VS Platform - Editor

This bug has been around since at least 2004 and, as of the above post in 2009, had not been fixed.


MS are liars, as usually on Connect
2013 calling. They haven't fixed it yet.
I think it just doesn't work while in debug mode. Once I stopped debugging the search worked fine
"Windows team unfortunately did not have time to fix this for their current release" - give me a break!
Running VS 2008 on Windows 8.1. Still seeing the same problem. If it is a Windows problem they're taking their time in fixing it.
P
Patrick McDonald

Sometimes Ctrl + Break works, sometimes Alt + Break, sometimes Ctrl + Scroll Lock, and other times Alt + Scroll Lock.

Right now, nothing works. This has been a huge problem for me. Shame on Microsoft for not fixing this bug in the last nine years.


You mean "Shame on" MS (or perhaps, "Same old" MS...? ;o) )
I meant shame. I like Ms a lot though it may not be cool but sometimes they really get my goat
I've been experiencing the same problem. Nothing fixes it, not even rebooting. And when are people pressing the various key combinations? When the cursor is in the editor. I've tried all four of the key combinations without any change.
S
Sandor Drieënhuizen

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...


None of the other fixes worked for me but deleting the all the find registry keys for all my versions of vs did - thanks!
No dice for me today. Oh well back to notepad++ and grep. So much for paid for software eh?
Worked great on VS2010. I made sure to restart VS but didn't need to restart Windows.
Did not work for me (Visual Studio 2015 on Windows 10)
B
Brian Schmitt

I don't think there is anything you can do to prevent it. It seems to occur after I have stopped a build with CTRL+Break...Maybe I am pressing CTRL+Scroll Lock during that time???

I have only had it happen to me 2-3 times, and that was several months apart.

What he is saying is that occasionally when performing a search within Visual Studio you get the mentioned error message. Even though you know there is stuff to find. It is some weird state that Visual Studio gets into. If you press the (CTRL+Scroll Lock) it will 'fix' the issue.


Does not work for me (Visual Studio 2015 on Windows 10)
P
Peter Mortensen

There are currently nine bugs on the Connect site related to this and marked as Not reproducible.

I created another one for Visual Studio 2010 SP1: "Find was stopped in progress" while performing search in Visual Studio

Please vote for it if you are unable to perform search.

PS: Microsoft claims that they fixed it in Visual Studio 2012.


Just happened to me - Visual Studio 2015 on Windows 10
P
Peter Mortensen

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:

Menu: Tools → Options → Environment → Find and Replace Uncheck the top three check boxes (checked by default in my settings). 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!


P
Peter Mortensen

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.


C
Community

My experience with this problem:

Steps to Reproduce

I just experienced this using Windows Server 2008 R2 Standard and Visual Studio 2010 SP1.

I was accessing Visual Studio remotely through Citrix Receiver (from my computer, A, to B) and through Windows Remote Desktop (from B to C). In this set-up (chaining two remote sessions), I sometimes have stuck modifier keys.

In B, I had pressed Windows+Pause to access the System Properties window. (This may or may not be related; I suspect there could have been a stuck key press or something.)

Later on, when I opened Visual Studio on C, I had this problem. Note that I always use Ctrl+Shift+F to access the Find All window.

Solution

I solved it by pressing Ctrl+Scroll Lock as suggested in other answers.

Cause

As for why this happens, I did notice that if I press Ctrl+Break while the text cursor is in the Find Results window but before any results are found then the search stops with the same message. This indicates to me that it's related to a keyboard problem.

As reported by others, apparently it's a Windows bug. Here's a discussion about this.


P
Paul Williams

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!


t
tponthieux

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.


N
Natrium

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.


P
Peter Mortensen

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.


P
Peter Mortensen

I can reproduce your issue.

There are some steps as following below you can try:

Check the setting Find and Replace (menu Tools → Environment → Find and Replace). Open "Developer Command Prompt for VS2013" and paste “devenv.exe /resetsettings” 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


D
Dave S

I have found another cause of this: Moving the solution folder to a new location, when CMake is part of the build process.

I was working with the Chromium Embedded Framework and moved the main CEF folder from e:\ to c:\ . This seems to break everything including Find because the CMake build scripts it uses hard-code the disk volume and full path (E:\folder) into the source paths.


S
Syscall

To be clear, Press Ctrl + ScrlLck, with the Search Window open. That resolved it for me too.