Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 435
EMP Avatar asked Jul 19 '10 02:07

EMP


1 Answers

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.

like image 71
Jarlaxle Avatar answered Sep 21 '22 23:09

Jarlaxle