Unable to load SOS in WinDbg

The CLR runtime dll was renamed to clr.dll with .NET 4. So in order to load the correct version of SOS you need to adjust your .loadby command. I.e.

.loadby sos clr

Also, if you’re on 64 bit, you should install the 32 bit version of Debugging Tools for Windows as well in order to debug 32 bit apps. They install side-by-side, so there’s no problem in having both the 32 bit and the 64 bit version on the same machine.

I would advice against copying SOS.dll. SOS needs to match the exact version of the framework, so as long as you load it from the framework directory using .loadby, you’re all set.

Leave a Comment