2018-01-05

Visual Studio 2017 - Go to Definition: Cannot navigate to the symbol undfer the caret.

Symptoms

The Go to Definition sometimes stops working, and I don't know why. The first symptom that this is happening is that the coloring of some class is unaltered (white) when it should be green.


Possibly related info

I am using VS 2017 Professional with ReSharper Ultimate.


Ways to fix it in order from least trouble afterwards to most


  • Clean solution
    • Close all files
    • Clean solution
    • Restart Visual Studio
    • Recompile all

    • This did not work for me.

  • Empty the symbol cache
    • Tools > Options > Debugging > Symbols > EmptySymbolCache
    • Open VS in admin mode

    • I have not tried this yet.

  • Delete the .vs folder
    • Close VS
    • Delete the .vs folder from your solution folder
    • Start VS
    • Recompile

    • I have not tried this yet.

  • Delete obj and bin folders
    • Close VS
    • Delete obj and bin folders from your project folder
    • Start VS
    • Recompile

    • I have not tried this yet

  • Delete the .user file from the project folder (may be hidden)
    • This will reset the customizations you've done to the IDE
    • The user file contains user preferences, such as debugging and deployment settings; used for saving and loading project preferences for a specific user.

    • I haven't tried this yet.

  • Run devenv.exe /resetuserdata
    • Devenv.exe may be found in...
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
    • This will reset many of your IDE customizations, including installed plugins.
    • ReSharper has to be repaired afterwards.

    • This worked for me.


Source:
https://stackoverflow.com/questions/33029127/go-to-definition-cannot-navigate-to-the-symbol-under-the-caret

No comments:

Post a Comment