c# - Visual Studio 不显示已加载程序集的名称

标签 c# .net visual-studio visual-studio-2008 assemblies

当从 Visual Studio 内部运行一个 c# 项目并观察调试输出时,您可以看到每个程序集的确切加载时间。 (右击调试输出窗口,勾选“show module load messages”)

根据 StackOverflow 上的屏幕截图和其他问题,我知道每个程序集都应该有一条消息,其中包含该程序集的名称。
然而,在我的电脑上,大部分时间我得到的都是无名的加载消息。名字不见了。

当我转到模块窗口(调试菜单,选择 Windows,然后单击模块。)时,我可以看到所有已加载模块的名称。

如何让名称出现在输出窗口中? 在极少数情况下它似乎有效,但我无法重现这些情况。

这是我在调试输出窗口中可以看到的三种程序集加载消息(抱歉,德语)

"MyProgram.vshost.exe" (Verwaltet): "Verwaltet" wurde geladen, das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"MyProgram.vshost.exe" (Verwaltet): "Verwaltet" geladen, Symbole geladen.
"MyProgram.vshost.exe" (Verwaltet): "Verwaltet" wurde geladen

这是粗略的英文翻译

'MyProgram.vshost.exe' (Managed): Loaded 'Managed'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MyProgram.vshost.exe' (Managed): Loaded 'Managed', loaded symbols.
'MyProgram.vshost.exe' (Managed): Loaded 'Managed'


这是我期望的输出:

'Example.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\IdeaBlade.UI.WinForms.DevExpressControls.v2_2_0\3.6.7.1__287b5094865421c0\IdeaBlade.UI.WinForms.DevExpressControls.v2_2_0.dll'
'Example.vshost.exe' (Managed): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Example.vshost.exe' (Managed): Loaded 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent32.exe', Symbols loaded.
'Example.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Example.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.QualityTools.ExecutionCommon\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll', Symbols loaded.

上面日志中程序集的路径和名称是我的电脑上缺少的。

(Visual Studio 2008 专业版)

最佳答案

  1. 能否请您检查“模块加载消息”是否已启用

    您可以在以下位置找到它: 工具 -> 选项 -> 调试 -> 输出窗口 -> 通用输出设置 -> 模块加载消息

  2. 工具 -> 选项 -> 调试 -> 常规 -> 启用仅我的代码(仅限托管)

关于c# - Visual Studio 不显示已加载程序集的名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14484327/

相关文章:

c# - 如何在 Web Api 中使用 Httpclient 并响应 Ok 获取对象

c++ - MSVS 错误 LNK2001 : unresolved external symbol

c++ - boost cpp 和 Visual Studio 2015

c# - 如何为现有数据库定义数据库项目

c# - Azure 函数计时器触发器

c# - 在特定时间间隔后调用函数

c# - 尝试修改另一个 DLL 引用的 DLL(反编译/重新编译)。

c# - 如何优化XML的书写方式?

.net - ASP.NET MVC : Access logs

c# - WebClient 很慢