SOS.dll in .NET Framework 4.0

The other day I discovered that my favorite debugging tool has changed a bit in .Net 4.0. If you’re not familiar with what it is, read up on MSDN.
The most annoying change turned out to be that SOS.dll is now rigidly tied to the .Net Framework core version — you can’t use the library from 4.0 Beta 2 with RC 1, and in general you can’t mix libraries from different architectures.
The modified .loadby command came to the rescue:

.loadby sos clr

This call automatically loads the correct version of SOS.dll for the matching architecture.
You can read more about the new features in blogs from folks at Microsoft, for example here: http://blogs.msdn.com/tess/archive/2010/03/01/new-commands-in-sos-for-net-4-0-part-1.aspx

Originally published 2010-03-30.