I am getting following error when trying to analyze a dump file.
0:000> !threads
The version of SOS does not match the version of CLR you are debugging.
Please load the matching version of SOS for the version of CLR you are debugging.
CLR Version: 4.0.30319.1022
SOS Version: 4.0.30319.34011
Failed to load data access DLL, 0x80004005 Verify that
1) you have a recent build of the debugger (6.2.14 or newer)
2) the file mscordacwks.dll that matches your version of clr.dll is
in the version directory or on the symbol path
3) or, if you are debugging a dump file, verify that the file
mscordacwks_<arch>_<arch>_<version>.dll is on your symbol path.
4) you are debugging on supported cross platform architecture as
the dump file. For example, an ARM dump file must be debugged
on an X86 or an ARM machine; an AMD64 dump file must be
debugged on an AMD64 machine.
You can also run the debugger command .cordll to control the debugger's load of mscordacwks.dll. .cordll -ve -u -l will do a verbose reload. If that succeeds, the SOS command should work on retry.
If you are debugging a minidump, you need to make sure that your executable path is pointing to clr.dll as well.
I am using correct version of WinDbg. I also know that the version of sos that I have on my machine is different than what was on machine where dump file is captured. So I am in process of getting correct version to see if that will solve the issue. However my problem is that when I open this dump file via DebugDiag Analyzer, it can read the dump file and provide me with correct results. I am just curious as to who DebugDiag is able to analyse this dump file when I don't have matching version of sos and mscordacwks on my machine?
Debugdiag may be using psscor4 or something similar. Generally in 4.x frameworks we don't need a matching version, i don't remember the version but if you use an older windbg that thing works like a charm. Sosex and psscor4 will help in this case aswell.