Reputation: 28586
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).
Upvotes: 60
Views: 44765
Reputation: 413
A quick fix for it is to hit Ctrl + Shift + F once and hit Ok once, then quickly hit Ctrl + Shift + F once again and hit the Stop Find button before the initial search is complete.
After this, try again to Search normally should prompt the correct output and display all occurrences in the Entire Solution.
Upvotes: 0
Reputation: 3101
Maybe a quite hard way to fix it, but I deleted all files in AppData\Local\Microsoft\VisualStudio and then Ctrl+Shift+F worked again.
Use %localappdata% in File Explorer and select Microsoft\VisualStudio and then delete the files in that folder.
Upvotes: 0
Reputation: 946
Following worked for me:
Visual Studio → Windows → Reset Window Panel.
The resizing of the visual studio made it to hide the option.
Upvotes: 9
Reputation: 31
Visual Studio 2022. Tried all of above and none worked for me. What did work for me was clicking "Use Regular Expressions" even though I wasn't using regular expressions. Once I did that, it started working.
Upvotes: 1
Reputation: 540
I had this problem in Visual Studio 2019 Professional. The above solutions did not work for me. I was able to solve this by:
Press CTRL+F to open the find tool window
At the bottom of the drop down you should see Search Options and under that Find in Files..
Somehow, my options got saved as Current Directory and the bin, obj, and packages sub directories.
Change the "Look in" item to any other option and it started to behave as expected.
Upvotes: 5
Reputation: 5277
Make sure you are searching the Entire Solution
and that you tick both of the options Include external files
and Include miscellaneous files
.
Upvotes: 0
Reputation: 3871
Visual Studio 2022 Community Edition v17.2.5
i uninstalled pro version and installed community, only solution worked for me is:
File Types : *.*
Upvotes: 2
Reputation: 2735
I met this problem when I was debuging 2 solutions, one of which was csharp and another was cpp. When I did the search in the cpp solution, the "file types" were still ".cs;.cshtml...". Switching to "*.cpp;..." fixed the problem.
Because I usually work in csharp, and it did take me quite a time to realized it.
Upvotes: 0
Reputation: 362
For me I just Change file types!!!
my version of visual studio is 16.11.9
Upvotes: 0
Reputation: 23
I just fixed mine by deleting and re-creating the solution/project files. Nothing else worked (ie: no button presses, window reset. restarting VS and the PC)
A symptom of the issue I had was that it was only not finding stuff from certain projects, but was able to find the same text if it was referenced in other projects (ie: as if Find in Files was disabled for just one project/directory tree).
So if you have the same symptom and nothing else works then try this solution and let me know if that helps.
Upvotes: 0
Reputation: 293
It's also not working for me on VS 2019 (16.6) I use a workaround by switching to "Use previous Find in Files": Tools->Options->Environment->Preview Features
Upvotes: 8
Reputation: 717
Like many other problems where VS simply stops to work properly, deleting the solutions .vs
(located in the solution directory) seems to be a 'valid option'.
CAUTION: this will cause you to loose:
... along with a lot of wrongly cached information that VS successfully managed to pile up leading to wrong find results.
I do this regularily when i encounter extreme lags even in debug-startups.
Upvotes: 13
Reputation: 1
It's silly, but what fixed it for me was prefacing the file extensions with an asterisk under Look at these File types
e.g.: *.js; *.aspx
instead of just .js; .aspx
Maybe try *.*
if you're having this issue.
Upvotes: 0
Reputation: 393709
I think I recognize this wellknown, longstanding bug:
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
Upvotes: 62
Reputation: 575
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.
Upvotes: 18
Reputation: 429
I fixed this by uninstalling and reinstalling Visual Studio (2017 Professional in my case).
Upvotes: 0
Reputation: 561
For me it started to work once I switched from "Find results 1 window" to "Find results 2 window" found in "Find and Replace" results option.
Upvotes: 0
Reputation: 14842
I experienced a similar but not identical symptoms in VS 2017.
In my case Find in Files searched 109 files; but that was only project files in the solution and dependencies. It turns out there is an option to "see more results", but it obscurely violates conventions making it less obvious. And to make it worse, I found I had to double-click (not just "click").
Observe the very last line after the summary. When I double-click that line, only then do I get expected behaviour!
Upvotes: 2