I'm having a very strange issue in trying to debug a minidump file using windbg. I've tried this both on my own machine & by running windbg on the target machine from where the minidump was taken but the result is the same in both cases.
At the start I load the required dlls as shown below, note the same issue occurs if I set the sympath to microsoft symbols server.
0:000> .symfix c:\sos
0:000> .load C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos
Checking the chain everything looks good, so I now go to run !pe and get an error about mscordacwks, which normally, as far as I know, indicates that I'm using the wrong version of the .net framework. But that really shouldn't be the case here as I running this on the target machine.
I then do a verbose loading
.cordll -ve -u -l
and get the following error message
CLRDLL: C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscordacwks.dll:4.0.30319.17929 f:8 doesn't match desired version 4.0.30319.296 f:8
What I don't understand is why windbg is looking for an older version of mscordacwks ? It appears that the .296 build is the version of the clr that gets download from the ms symbol server, but I've explicity told windbg to use the local version.
I've tried the approaches suggested here and here but nothing works. Any help is greatly appreciated.
This is because you're debugging a .NET 4.0 dump on a machine with .NET 4.5 installed. The underlying debug APIs changed significantly between 4.0 and 4.5, such that you cannot debug a .NET 4.0 dump with the .NET 4.5 SOS.dll. What I do is to copy a .NET 4.0 SOS to my winext directory and load it explicitly when I'm debugging a .NET 4.0 dump.