Visual Studio 2008 - "Find all references" only searches the containing file

2.4k Views Asked by At

I'm trying to fix a bug in a solution I have, but whenever I click "Find all references" for any variables or methods, it only finds references in the file that the variable I click is in.

I'm fairly certain which variables/functions the bug is coming from, but as I have no idea where in the code base they are getting messed up, I'm having a difficult time fixing it. Anybody have any ideas on why "Find all references" is only finding some references?

edit:

I restarted once, and it did nothing to help. I read some other things about the intellisense DB being messed up saying it can be remade by deleting the DB and reopening the solution. I deleted the DB, and reopened, but got nothing saying it was rebuilding and it still didn't work.

I then restarted the program again, after doing nothing, and somehow it appears to be working o.O

I am going to check some other stuff and then update this again before considering this answered.

3

There are 3 best solutions below

1
On BEST ANSWER

Deleting the Intellisense Database file in the same directory as the solution causes the intellisense database to be rebuilt after restarting VS and reopening the solution. This will fix the above problem.

1
On

Occasionally the settings seem to get corrupted and things stop working:

Tools -> Import & Export Settings -> Reset All Settings

That should do it

3
On

Strange, my Visual Studio looks in all files when I use "Find all references", I tried right now.

Have you tried to open another solution and look up something there, just to make sure the problem lies in Visual Studio and not in that specific solution?