Visual Studio-我要“转到定义"打开对象浏览器,而不是“元数据" [英] Visual Studio - I want "Go To Definition" to open Object Browser, not "metadata"

查看:310
本文介绍了Visual Studio-我要“转到定义"打开对象浏览器,而不是“元数据"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio 2002和2003版本中,转到定义"将在对象浏览器中找到选定的类型或成员.从2005年起,它将打开从元数据生成"的源窗口.如何配置这些较新的版本以转到对象浏览器? (换句话说,我与这一个有相反的问题.)

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

安装ReSharper会进行此更改,所以我知道这是有可能的,但是如何使用ReSharper?

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

推荐答案

作为解决方法,您可以创建以下宏:

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.

在Visual Studio 2010中测试.

Tested in Visual Studio 2010.

这篇关于Visual Studio-我要“转到定义"打开对象浏览器,而不是“元数据"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆