0

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.

Michael
  • 53
  • 4

3 Answers3

0

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?

Albireo
  • 10,977
  • 13
  • 62
  • 96
  • I wouldn't be surprised if it was solution specific, but I still can't imagine why it wouldn't work for every function I try and every variable I try without it in part being the fault of visual studio. It only searches the file itself and the header file, but any references outside of that are not found. The same goes for the call browser. – Michael Dec 13 '10 at 14:07
  • The problem lies completely in Visual Studio, even if this behaviour is solution related, since the solution is created and maintained by VS itself. Have you tried the low-tech approach: restarting VS and/or the pc? Sometimes VS goes haywire and won't come back without a restart... – Albireo Dec 13 '10 at 14:16
  • I just did, to no avail. I hate that hitting enter submits comments instead of newlining. Not used to it. Keep prematurely submitting comments. Anyway, I'm going to update my question with new details. – Michael Dec 13 '10 at 14:26
0

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.

Michael
  • 53
  • 4
  • I can't find that database file, where is it? I have deleted the 'obj' folder, cleaned and rebuilt my solution, but still facing the same issue – Rafael Mar 10 '15 at 03:00
0

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

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

That should do it

Priyanka
  • 9
  • 1
  • -1 Reset All Settings is not the way to get something fixed as it destroys all your settings you probably have set over the years. – Szybki Oct 19 '16 at 13:23