views:

544

answers:

4

Recently, I've begun to notice that Visual Studio 2008 isn't finding all of the instances of a text I search for when I'm searching Entire Solution. It will start to search through the files to find a term, but then at some point, it stops searching other files, and starts alternating between only two files. This is very aggravating, because I can't always find what I'm looking for. In fact, to make matters worse, sometimes search simply doesn't find a term that I know exists, so I'll close the search form, switch documents, run the search again, and the term will be found.

Note that in all the situations above, I am searching the Entire Solution.

Does anybody have any experience with this? If so, how did you fix it?

+1  A: 

have you "checked" search hidden text? often this is the problem

karlis
Check out this link: http://www.platinumbay.com/blogs/dotneticated/archive/2008/04/28/visual-studio-search-hidden-text.aspx
Slack
+1  A: 

That is indeed very annoying. This happened to me using VS2003, but I upgraded to VS2005 shortly after so I never tried fixing it. I did a search and here are some possibilities to get you started:

  • Run devenv /resetsettings
  • Window menu-->Select Reset Window Layout (not sure why this would help?)
  • Repair VS2008, if that fails try reinstalling.
DavGarcia
Can't argue with reinstalling.
David Morton
Did any of the other suggestions work or did you have to resort to reinstalling?
DavGarcia
A: 

In case others run into this problem and cannot solve it, I found an unexpected solution to this problem.

I had to go through a LOT of combinations to figure this out, including, but not limited to, doing a repair on Visual Studio, uninstalling Visual Studio, reinstalling, disabling all add-ins, running in safe-mode, etc. None of this worked, however, including a complete uninstall and re-install of Visual Studio.

The problem in my case was that if the 'Search up' checkbox is checked within 'Find options', searching on the Entire Solution fails. In the most extreme example, if you close all documents and then search on "a" (without the quotes) or check the 'Use Regular Expressions' checkbox/dropdown and search on ".*" (again, without the quotes) you will still get no results.

If you uncheck the 'Search up' checkbox, however, then everything appears to work just fine.

I don't know for how many others this issue will apply, but I'm guessing that others must be getting snagged by this as well.

Two other related threads on this topic:

  1. Find and Replace Won't Search Entire Solution (ASP Forums)

  2. VS 2008 Replace in Entire Solution Only Works Once (Microsoft Connect)

I hope this helps somebody...

Mike

Mike Rosenblum
Yeah, this didn't really work for me. I sometimes actually use "search up" as a way to try to find more instances, when the lack of "search up" fails.
David Morton
Yeah, I don't know then. Clearly this is a very buggy feature, and it's a critical one, so I hope that they fix this at some point. When find/replace fails, it really is a disaster, especially because we might not have any way of knowing that it's failing. :-(
Mike Rosenblum
A: 

In my case "Find in Files" function stopped working completely. "Reinstall Windows/Visual Studio!" immediately came to my mind. But there's much simpler solution that worked for me: Spin around on your chair 3 times, clap your hands twice and then press Control + Scroll Lock.

Sources: http://geekswithblogs.net/claraoscura/archive/2008/10/17/125902.aspx http://bloggingabout.net/blogs/edward/archive/2005/01/31/2136.aspx