11

这是我第一次使用 .dmp 文件进行调试或做任何事情。我正在使用调试诊断。当我运行我的分析时,我得到了这个错误 -

Analysis results may be incomplete because an error occurred while initializing the CLR diagnostic runtime for w3wp.DMP.

Dump File:  w3wp.DMP

Type:  DebugDiag.DotNet.DacNotFoundException

Message:  CLR is loaded in the target, but the correct dac file cannot be found. DacFileName: mscordacwks_Amd64_Amd64_10.0.30319.01.dll. DacLocation: 

它说要解决这个问题,我必须这样做:

To fix this problem, you can copy mscordacwks.dll from the server where the dump was taken and rename it to mscordacwks_Amd64_Amd64_10.0.30319.01.dll and add the path of the folder to the Symbol server path by going to Tools-> Options and Settings

我做到了,现在我收到以下错误:

转储文件:w3wp.DMP

类型:Microsoft.Diagnostics.Runtime.ClrDiagnosticsException

消息:无法加载 dac:D:\Dumps\mscordacwks_Amd64_Amd64_10.0.30319.01.dll

Stack Trace:

Microsoft.Diagnostics.Runtime.DacLibrary..ctor(DataTargetImpl dataTarget, String dacDll)

Microsoft.Diagnostics.Runtime.DataTargetImpl.CreateRuntime(String dacFilename)

DebugDiag.DotNet.NetDbgObj.CreateRuntimeAndGetHeap(String dumpPath, IDbgObj3 legacyDebugger, String symbolPath, Boolean throwOnBitnessMismatch, Boolean loadClrHeap)

HResult: UnknownError

我曾尝试浏览几个链接,其中一个是this。什么都得不到。如何解决此问题并查看转储文件的整个分析?

4

1 回答 1

4

只有在与转储来源不同的机器上进行分析时,您才应该得到这个。原因很简单,就是使用了不同版本的 mscordacwks.dll。

要修复它,请将 mscordacwks.dll 从源计算机复制到分析计算机的临时目录(而不是%WINDIR%\Microsoft.net 目录)。

将复制的 mscordacwks.dll 重命名为 mscordacwks_Amd64_Amd64_10.0.30319.01.dll。

将临时目录添加到 debugdiag 分析应用程序中的符号搜索路径。

重新运行分析。

于 2015-12-01T20:06:00.933 回答