3

I am trying to read the crash dump file for a .NET 2.0 assembly using WinDbg and SOS.dll.

From reading around, I have understood that I have to copy sos.dll, mscorwks.dll and mscordacwks.dll into the windbg install directory.

So I did this, but WinDbg then told me that the copies from my own .Net directory are the wrong version. WinDbg is looking for mscordacwks.dll_x86_x86_2.0.50727.4211.dll, and I have got mscordacwks.dll_x86_x86_2.0.50727.5420.dll

Here is the question: where do I find the correct versions of these files?

a) on the machine where the application that crashed was built
or
b) on the machine where the application crashed?

I found this site where you can see which .NET patch has which versions included, but I haven't managed to download the relevant patch (can't find it) so it occurred to me that copying the files from one of the affected machines would be quicker.

user1725145
  • 3,993
  • 2
  • 37
  • 58
  • possible duplicate of [Where can I find and download different version of mscorwks.dll and mscordacwks.dll?](http://stackoverflow.com/questions/11765266/where-can-i-find-and-download-different-version-of-mscorwks-dll-and-mscordacwks) – user1725145 Feb 26 '13 at 11:08

1 Answers1

2

Either a or b will work, provided that .NET has not since been updated on either machine. If I don't have a particular DAC file, I usually get it from the machine that crashed. Remember to save every single DAC you ever encounter into a directory. Then add this directory to your symbol path. This will cause you to have less difficulty locating DACs as time goes on.

Steve Johnson
  • 2,958
  • 13
  • 15
  • Thanks! The answer to this question: http://stackoverflow.com/questions/11765266/where-can-i-find-and-download-different-version-of-mscorwks-dll-and-mscordacwks suggested that the version from the machine where the crash ocurred was needed. What if the versions in a) and b) are different? – user1725145 Feb 26 '13 at 12:01
  • The version of the DAC must exactly match the CLR version in the dump to all 4 version places, so if a and b are different, then at least one of them won't work to debug the dump. The answer you cite is correct. If you get the DAC from the machine on which the crash occurred, it'll always work, provided .NET has not been updated on that machine since the crash occurred. – Steve Johnson Feb 27 '13 at 02:13
  • Thank you - also for the tip about saving DACs. – user1725145 Feb 27 '13 at 07:35