Unable to load SOS.dll extension in Visual Studion 2012

这一生的挚爱 提交于 2019-12-22 00:34:26

问题


I've started to read some materials on advanced debugging tools and techniques. I use VS2012 Ultimate and the target framework is .NET 4.0. I got to the point where I need to load SOS.dll in the Immediate window during a debug session and it just doesn't work.

I tried these with no luck

  • .load sos
  • .load sos.dll
  • .load C:\Windows\Microsoft.NET\Framework\v4.0.30319\sos.dll

I always get this message:

Invalid expression term '.'

So, any idea ? What am I missing here ?


回答1:


You can change this setting to work around the issue:

Under Tools->Option->Debugging->General, check the box labeled "Managed Compatibility Mode."

That fixes the issue for me. This workaround is from http://connect.microsoft.com/VisualStudio/feedback/details/789601/-load-sos-does-not-works#




回答2:


.load C:\Windows\Microsoft.NET\Framework\v4.0.30319\sos.dll

works for me with VS2012 Update3




回答3:


In my case the error loading was a matter of need to use path separator as '\\' (Windbg).



来源:https://stackoverflow.com/questions/16966385/unable-to-load-sos-dll-extension-in-visual-studion-2012

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!