msbyuva
msbyuva

Reputation: 3625

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

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 the menu... i use them a lot, how can I get them work

Upvotes: 15

Views: 21284

Answers (6)

user15061777
user15061777

Reputation: 11

Fortran is not listed in Tools > Options > Text Editor > File Extension, so this route did not work for me. What worked for me was:

Tools > Options > Text Editor > Fortran > Advanced > Enable Find All References.

Set the above field to True. Also

Tools > Options > Text Editor > Fortran > Advanced > Enable Go To Definition.

This field may need to be changed to true.

Upvotes: 1

Damian
Damian

Reputation: 1259

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)

Upvotes: 6

James Lawruk
James Lawruk

Reputation: 31363

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.)

Upvotes: 0

Roel van Lisdonk
Roel van Lisdonk

Reputation: 680

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.

Upvotes: 44

radato
radato

Reputation: 930

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...

Upvotes: 1

Liam
Liam

Reputation: 29750

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

Upvotes: 0

Related Questions