Visual Studio: "Go To Definition", inconsistent behavior

1

In Visual Studio, to view a class' code, you can:

  • right click the class > Go to Definition.
  • Ctrl + Click the class name in code file.
  • F12

Each of which are used to navigate the definition.

However, the result differs and I cannot figure out why. Sometimes, it does as expected and brings me to the class code; but, other times it opens up the Object Browser, which doesn't really help me too much.

Does anyone experience this also? Why am I brought to the Object Browser instead of the class directly?

Note: I'm sure this behavior -- while slightly annoying -- is completely logical once I understand the underlying reason this happens.

Nick

Posted 2014-05-09T15:02:39.740

Reputation: 844

Can it be that the behaviour is different when you are running your application or not? Or perhaps it just depends in which project you are trying to access the definition, if you have access to the code as a project dependency or just as an external library? – mefepe – 2014-05-09T20:18:29.793

No answers