.net core .NET核心运行时不支持';t将可用SDK版本与WinDbg的源SOS.DLL匹配

.net core .NET核心运行时不支持';t将可用SDK版本与WinDbg的源SOS.DLL匹配,.net-core,windbg,.net Core,Windbg,我有一个在我的系统上运行的应用程序的DMP。这是一个.NET核心应用程序。我正在尝试使用WinDbg来查看内存问题。从周围的阅读来看,似乎我需要获得与所用运行时匹配的SOS.DLL文件,而且比预期的要困难得多 应用程序似乎在我的电脑上运行的运行时与发布的SDK不匹配: WinDbg:lmDvmcoreclr显示 Loaded symbol image file: coreclr.dll Image path: C:\Program Files\WindowsApps\Microsoft.

我有一个在我的系统上运行的应用程序的DMP。这是一个.NET核心应用程序。我正在尝试使用WinDbg来查看内存问题。从周围的阅读来看,似乎我需要获得与所用运行时匹配的SOS.DLL文件,而且比预期的要困难得多

应用程序似乎在我的电脑上运行的运行时与发布的SDK不匹配:

WinDbg:lmDvmcoreclr显示

Loaded symbol image file: coreclr.dll
    Image path: C:\Program Files\WindowsApps\Microsoft.NET.CoreRuntime.2.2_2.2.27404.2_x86__8wekyb3d8bbwe\coreclr.dll
    Image name: coreclr.dll
    Browse all global symbols  functions  data
    Timestamp:        Tue Jan 22 18:40:54 2019 (5C47AA06)
    CheckSum:         004573F9
    ImageSize:        00460000
    File version:     4.6.27322.1
    Product version:  4.6.27322.1
我从下载SDK,试图找到一个匹配的coreclr.dll,以便使用SOS.dll

SDK 2.2.3->构建27414

SDK 2.2.2->构建27317

因此,这个4.6.27322.1似乎是在我的系统上的一个版本,在这些版本之间

你知道这是怎么发生的吗?我怎样才能得到它的SOS.DLL

举一个我真正展示的问题的例子(这让我相信我应该得到准确的SOS.DLL),当我尝试使用SOS时:

0:000> .loadby sos coreclr
0:000> 
0:000>  !dumpheap -stat
PDB symbol for coreclr.dll not loaded
Failed to load data access module, 0x80131c4f
Verify that 1) you have a recent build of the debugger (6.2.14 or newer)
            2) the file mscordaccore.dll that matches your version of coreclr.dll is
                in the version directory or on the symbol path
            3) or, if you are debugging a dump file, verify that the file 
                mscordaccore_<arch>_<arch>_<version>.dll is on your symbol path.
            4) you are debugging on supported cross platform architecture as 
                the dump file. For example, an ARM dump file must be debugged
                on an X86 or an ARM machine; an AMD64 dump file must be
                debugged on an AMD64 machine.

You can also run the debugger command .cordll to control the debugger's
load of mscordaccore.dll.  .cordll -ve -u -l will do a verbose reload.
If that succeeds, the SOS command should work on retry.

If you are debugging a minidump, you need to make sure that your executable
path is pointing to coreclr.dll as well.
0:000>.loadby sos coreclr
0:000> 
0:000>  !转储堆-统计
未加载coreclr.dll的PDB符号
未能加载数据访问模块0x80131c4f
验证1)您是否拥有调试器的最新版本(6.2.14或更新版本)
2) 与您的coreclr.dll版本匹配的文件mscordacore.dll为
在版本目录或符号路径上
3) 或者,如果正在调试转储文件,请验证该文件
mscordaccore___;.dll位于符号路径上。
4) 您正在受支持的跨平台体系结构上进行调试
转储文件。例如,必须调试ARM转储文件
在X86或ARM机器上;必须创建AMD64转储文件
在AMD64机器上调试。
您还可以运行调试器命令.cordl来控制调试器的
加载mscordacore.dll。Cordell-ve-u-l将执行详细的重新加载。
如果成功,SOS命令应在重试时工作。
如果您正在调试小型转储,则需要确保您的可执行文件
路径也指向coreclr.dll。

谢谢

您不需要SDK下载,但需要运行时下载,请注意,SOS最近已从coreclr(现在是运行时)存储库中移出,进入其自己的dotnet/diagnostics存储库。对于版本3+,CORECRL和sos版本不再需要匹配。也就是说,对于2.2,您仍然需要匹配的SOS。