vb.net - 在 visual studio 的 F12 上使用 VB.net 转到元数据

标签 vb.net visual-studio-2010 visual-studio-2012

使用 C# 进行开发时,您可以右键单击一个类,然后单击转到定义。如果该类是第 3 方代码(Microsoft 或其他 dll 引用),则会出现类元数据。 (或者你可以按 F12)。

在 VB.NET 中,出现了无用的对象浏览器窗口。有没有办法让它表现得像 C#?我只想显示元数据。对象浏览器不允许您像搜索纯文本文件(元数据)那样进行自由文本搜索。


例如,C# 元数据如下所示(使用 IEnumerable):

#region Assembly mscorlib.dll, v4.0.0.0
// C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll
#endregion

using System.Collections;

namespace System.Collections.Generic
{
    // Summary:
    //     Exposes the enumerator, which supports a simple iteration over a collection
    //     of a specified type.
    //
    // Type parameters:
    //   T:
    //     The type of objects to enumerate.This type parameter is covariant. That is,
    //     you can use either the type you specified or any type that is more derived.
    //     For more information about covariance and contravariance, see Covariance
    //     and Contravariance in Generics.
    public interface IEnumerable<out T> : IEnumerable
    {
        // Summary:
        //     Returns an enumerator that iterates through the collection.
        //
        // Returns:
        //     A System.Collections.Generic.IEnumerator<T> that can be used to iterate through
        //     the collection.
        IEnumerator<T> GetEnumerator();
    }
}

在 VB.Net 中,F12 键将调出对象浏览器:

object browser

最佳答案

如果第 3 方代码是用 C# 编写的,而您的代码是用 vb.net 编写的,则 VS 无法向您显示定义。这是多次报告的错误 - 似乎“元数据”功能或“转到定义”功能仅适用于纯 C# 或纯 VB.NET 项目

see this post

关于vb.net - 在 visual studio 的 F12 上使用 VB.net 转到元数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25793418/

相关文章:

windows - 以管理员身份运行另一个程序

c++ - Visual Studio 2010 不显示局部变量的调试信息

entity-framework - 如何在 EF (MVC4 Visual Studio 2012) 中禁用代码优先功能

c# - Visual Studio 2012 项目不会在 2010 年打开

.net - 是否有一个对话框可以同时选择多个文件和文件夹的混合?

vb.net - 如何在VB.NET中提取邮件正文中的img标签

c++ - VS2010 RC - 调试器中只有 100 个 std::map 元素

javascript - jquery-1.4.1.min.js 和 jquery-1.4.1.js 之间的区别

c++ - Visual Studio 中的静态库与 DLL

VB.NET 如何重用/重新查询/重置/清除现有图表以显示新数据