Visual Studio - I want "Go To Definition" to open Object Browser, not "metadata"

EMP picture EMP · Jul 19, 2010 · Viewed 7.7k times · Source

In Visual Studio version 2002 and 2003 "Go To Definition" would find the selected type or member in the Object Browser. In 2005 onwards it opens a source window "generated from metadata" instead. How do I configure these newer versions to go to Object Browser? (In other words, I have the opposite problem to this one.)

Installing ReSharper makes this change, so I know it must be possible, but how do I do it without ReSharper?

Answer

Jarlaxle picture Jarlaxle · Jul 26, 2010

As workaround you can create the following macro:

Sub GoToDefinitionUsingObjectBrowser()
    DTE.ExecuteCommand("Edit.SelectCurrentWord")
    DTE.ExecuteCommand("View.ObjectBrowser")
    DTE.ExecuteCommand("View.ObjectBrowserSearch", DTE.ActiveDocument.Selection.Text)
End Sub

Then go to Tools/Options/Keyboard and assign hot key for this macro.

Tested in Visual Studio 2010.