.net 无法找到模块“mscorwks.dll”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1419939/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unable to find module 'mscorwks.dll'
提问by Yongwei Xing
I try to use the winDBG to debug a dump file. When I run .loadby sos mscorwks.dll
我尝试使用 winDBG 来调试转储文件。当我运行 .loadby sos mscorwks.dll
It gave me an error message. Unable to find module 'mscorwks.dll'
它给了我一条错误信息。无法找到模块“mscorwks.dll”
Has anyone seen this before?
有没有人见过这个?
采纳答案by Martin Moser
Don't add the .dll, try just .loadby sos mscorwks
不要添加 .dll,试试吧 .loadby sos mscorwks
回答by Sixto Saez
If you are debugging a .NET 4.0application, you need to use the following instead of mscorwks:
如果您正在调试.NET 4.0应用程序,则需要使用以下内容而不是mscorwks:
.loadby sos clr
.loadby sos clr
Here is a good overviewof the commands available for .NET 4.0. Enjoy!!
这里很好地概述了 .NET 4.0 可用的命令。享受!!
回答by Russell Troywest
I had this issue as well and it turned out to be because the debugger was breaking into the app before the CLR was loaded. I had to let the app run throug further before I could do much of anything.
我也遇到了这个问题,结果证明是因为调试器在加载 CLR 之前就闯入了应用程序。在我可以做很多事情之前,我不得不让应用程序运行得更远。
Doing this in windbg might help:
在 windbg 中执行此操作可能会有所帮助:
sxe ld:mscorlib
g
(... breaks again ...)
.loadby sos mscorwks
The 'sxe ld:..' stops on module load.
'sxe ld:...' 在模块加载时停止。
As Sixto mentions, if you are debugging dotnet 4 apps you'll need to replace the last line with
正如 Sixto 提到的,如果您正在调试 dotnet 4 应用程序,则需要将最后一行替换为
.loadby sos clr
回答by Troy Parsons
Also ensure you have correct bitness - trying to do this in 64-bit windbg while debugging 32-bit app will give you the same error.
还要确保您具有正确的位数 - 在调试 32 位应用程序时尝试在 64 位 windbg 中执行此操作会给您带来相同的错误。
回答by Brian Rasmussen
If you have the .NET framework directory (e.g. c:\Windows\Microsoft.NET\Framework\v2.0.50727) in your path, you can just use
如果您的路径中有 .NET 框架目录(例如 c:\Windows\Microsoft.NET\Framework\v2.0.50727),则可以使用
.load sos

