Go to definition disabled in Visual Studio 2013

Posted by on Jul 9, 2014 in Asp.net

I recently ran in to the odd problem of the ‘Go To Definition’ content menu entry being disabled. F12 also didn’t work which made code navigation a major problem. I have no idea why, but the following solution fixed it for me:

  1. Close Visual Stidio
  2. In the solution directory, ensure hidden files are enabled
  3. Delete the hidden .sou file that contains all the user options
  4. Restart visual studio and re-build your solution

The downside to this is that it deletes all your user specific settings for the solution (e.g. in an asp.net application you will lose custom start pages, IIS settings and so on).
If anyone knows a way to fix this without deleting the file, please contact me!