visual studio right click missing find all refences and go to definition disabled

后端 未结 5 810
北海茫月
北海茫月 2021-01-01 19:48

I am using Visual Studio 2010, suddenly from right click menu Go to Defination option is disabled and even F12 does not work. Find all referneces option is missing from th

相关标签:
5条回答
  • 2021-01-01 19:59

    I had the same problem with Microsoft Visual Studio 2013 Premium.

    Fixed it by following the steps:

    1. Close your solution.
    2. Delete hidden .suo file in folder where your solution's .sln file exists.
    3. Open your solution.
    4. Rebuild your solution.

    F12 should now work.

    0 讨论(0)
  • 2021-01-01 20:01

    I am working on a solution with C++ combined with C# which is set to VS 2010 compiler but I edit it with the 2013 IDE. All of this is orchestrated with the MS-TFS. I searched for both *.ncb and *.sou files but couldn't find them. Eventually I saw eodabash's comment of changing the File Extension option, and hey presto, it works for me...

    0 讨论(0)
  • 2021-01-01 20:16

    For me, rebuilding the solution, then closing the file in visual studio and reopening it fixed it.

    0 讨论(0)
  • 2021-01-01 20:20

    To reiterate what @eodabash said on 2014-04-07 was EXACTLY it.

    I'm using Visual Studio 2013 Premium and I too lost Go To Definition functionality when the file was file containing the class was not opened.

    Resolution:

    1. Tools > Options > Text Editor > File Extension
    2. Notice extension, "cs" was missing from list.
    3. Type, "cs" in the Extension box
    4. Select, "Microsoft Visual C#" under Editor
    5. Click, Add. Click, Ok.

    BOOM!

    My issue was NOT an extension. It was NOT the .suo files. It was NOT a reinstall issue. It worked in C++ but NOT C#.

    It WAS the file extensions option were not associated with C#. (facepalm)

    0 讨论(0)
  • 2021-01-01 20:21

    Verify the source file is part of the solution you have open. - Sigh.

    (For me, I was looking for 'Go to Definition' for a source file in a completely different solution than what I had opened in Visual Studio. I opened the correct solution, verified 'Go To Definition' was functional, then grabbed a much needed cup of coffee.)

    0 讨论(0)
提交回复
热议问题