none
Failed to Load SOS in WinDbg for .NET 3.5 app after installing VS 2010 Beta2 RRS feed

  • Question

  • Hi,

    After I installed VS 2010 Beta 2, I cannot load the old SOS into WinDbg for my .NET 3.5 app.


    Microsoft (R) Windows Debugger Version 6.11.0001.404 X86
    ...
    ModLoad: 72880000 728ca000   C:\Windows\system32\mscoree.dll
    ...
    ModLoad: 726b0000 72715000   C:\Windows\Microsoft.NET\Framework\v4.0.21006\mscoreei.dll
    ...
    ModLoad: 6b3c0000 6b950000   C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
    ...


    0:047> .loadby sos mscorwks
    0:047> !dumpheap
    Failed to find runtime DLL (clr.dll), 0x80004005
    Extension commands need clr.dll in order to have something to do.


    Can someone explain why it is looking for clr.dll (that should be only for .NET 4.0 apps?
    How can I get WinDbg with SOS to work for my .NET 3.5 app with VS 2010 installed?

    Thanks!
    Thursday, November 12, 2009 10:15 PM

Answers

All replies

  • Hi,
    Did you build the .NET 3.5 application from VS 2010? or the it is an existing exe before install VS 2010?
    It seems that your .NET Framework version has been updated to 4.0 when you install VS2010, In .NET 4.0, mscorwks.dll is replaced by clr.dll, so, you can try this command to load sos:
        .loadby sos clr
    On my machine, I installed .NET 4.0, and then build a .NET 3.5 application using VS 2008, I can run followong command successfully:
        .loadby sos mscorwks
        !dumpheap


    Thanks,
    Eric
    Please remember to mark helpful replies as answers and unmark them if they provide no help.
    Monday, November 16, 2009 8:02 AM
  • Hi Eric,

    I built my app using VS 2008 targeting .NET Framework 3.5.  My machine has VS 2005, VS 2008 and VS 2010 beta 2 installed.

    clr.dll is not one of the loaded modules.
    0:047> .loadby sos clr
    Unable to find module 'clr'

    Monday, November 16, 2009 1:55 PM
  • Hi,
    Thanks for you submitting feedback to connect.Microsoft.com, and also glad to see you have got it resolved by command:
        .unload C:\Windows\Microsoft.NET\Framework\v4.0.21006\sos
    I attach the issue link here for other community members who might encounter similar trouble, thanks again.
    https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=510315&wa=wsignin1.0

    Thanks,
    Eric
    Please remember to mark helpful replies as answers and unmark them if they provide no help.
    • Marked as answer by eryang Wednesday, November 18, 2009 2:58 AM
    Wednesday, November 18, 2009 2:58 AM