What to do with “The version of SOS does not match the version of CLR you are debugging” in WinDbg?

This is what worked for me: Download the following DLLs: clr.dll mscordacwks.dll SOS.dll from this folder on the machine that generated the dump: C:\Windows\Microsoft.NET\Framework64\v4.0.30319 Run the following command. The path to SOS.DLL should be without quotes, unescaped path delimiters: .load path to downloaded SOS.DLL I think a new WinDbg session is required for this to … Read more

How to create minidump for my process when it crashes?

You need to programatically create a minidump (with one exception, see next link). CodeProject has a nice article on MiniDumps. Basically, you want to use dbghelp.dll, and use the function MiniDumpWriteDump() (see MSDN on MiniDumpWriteDump). How effective such dumps are depends very much on the application. Sometimes, for optimized binaries, they are practically useless. Also, … Read more