Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio "Find in Files" does not work

Visual Studio (2010, Ultimate) finds nothing when I do Find in Files (Ctrl+Shift+F) in the Entire Solution. However, it finds 2 occurrences when searching Current Document or Current Project.

I see that the "Total files searched" in the output window is a random number, and does not correspond to the number of files in my solution (is much smaller).

I already did devenv /resetsettings but this didn't help.

Example of output of 2 consecutive searches in "all solution":

Find all "zoom -", Subfolders, Keep modified files open, Find Results 1, "Entire Solution", "*.vb"
Matching lines: 0 Matching files: 0 Total files searched: 24
Find was stopped in progress.

Find all "zoom -", Subfolders, Keep modified files open, Find Results 1, "Entire Solution", "*.vb" Matching lines: 0 Matching files: 0 Total files searched: 32
Find was stopped in progress.

I don't know why it says "Find was stopped", because I wait the end of search (don't press any buttons).

like image 555
serhio Avatar asked Feb 09 '12 09:02

serhio


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 Find the location of a file in Visual Studio?

Did you know you can right click on the tab in the code editor window to access the file path or to open the folder in Windows Explorer? Check it out. By default, the file path for Visual Studio projects is very long.


2 Answers

I think I recognize this wellknown, longstanding bug:

  • https://web.archive.org/web/20100617142305/http://connect.microsoft.com/VisualStudio/feedback/details/105511/find-in-files-says-no-files-were-found-to-look-in-find-was-stopped

The workaround mentioned there worked for me when I had this problem

I found a tip to try pressing Ctrl + ScrollLock to fix it, and it worked.

I think most people report success with the (Ctrl-)Break key, but some say (Ctrl-)ScrollLock worked instead

like image 77
sehe Avatar answered Nov 04 '22 07:11

sehe


This is obviously a way late answer but I did get here while looking for a solution to a somewhat similar issue and I'd like to share the fix which eventually worked:

Make sure you clear the "Look at these file types:" box from whitespaces which will prevent the search from running properly.

like image 20
JKJ Avatar answered Nov 04 '22 05:11

JKJ