2

I use Microsoft.Diagnostics.Runtime and try to analyze the crash dump, but I don't have matching mscordacwks.dll on my machine.

Please, give me an advice what to do or how can I get it from Microsoft's symbol server?

Picrofo Software
  • 5,475
  • 3
  • 23
  • 37
burusera
  • 189
  • 4
  • 11
  • Maybe this can help you: [How to debug: w3wp.exe process was terminated due to a stack overflow (works on one machine but not another)](http://stackoverflow.com/questions/5053708/how-to-debug-w3wp-exe-process-was-terminated-due-to-a-stack-overflow-works-on/13300623#13300623) – Thomas C. G. de Vilhena Jun 24 '13 at 19:54
  • unfortunately, no. I don't want to use WinDb and try to use MSFT library Microsoft.Diagnostics.Runtime – burusera Jun 25 '13 at 07:17
  • Did you find any answer? – Roi Shabtai Dec 24 '13 at 10:03

2 Answers2

0

Missing mscordacwks.dll is a pain that I have run into from time to time using WinDbg to look into crash dump files (I notice that you are attempting to use ClrMD to accomplish the same end goal). Normally the microsoft symbol server is pretty comprehensive, but in the case of mscordacwks.dll not all versions exist on the public symbol server (as is described here). The best way to get the matching mscordacwks.dll version is to pull it from the machine (and the appropriate .net framework folder) where the crash dump was created if the public symbol server should fail.

Honestly I am more of a WinDbg user so I am more used to dealing with mscordacwks there, but from looking around on google I did find a couple of interesting articles. The first mentioned that you can do this:

// DataTarget.ClrVersions lists the versions of CLR loaded in the process (this may be
// v2 and v4 in the Side-By-Side case.
ClrInfo version = target.ClrVersions[0];

// CLRVersionInfo contains information on the correct Dac dll to load.  This includes
// the long named dac, the version of clr, etc.  This is enough information to request
// the dac from the symbol server (though we do not provide an API to do this).  Also,
// if the version you are debugging is actually installed on your machine, DacLocation
// will contain the full path to the dac.
string dacLocation = version.TryGetDacLocation();

If that doesn't work there is someone who posted code for a DacLocator class that is more intricate. Hopefully one of those two avenues should work for loading in the version of the dll that you need.

Chiune Sugihara
  • 1,179
  • 1
  • 7
  • 14
0

There is now a TryDownloadDac method on the ClrVersion class. You will need to be running your process in the same architecture that the application you're debugging was run in (64bit/32bit) in order to successfully load the DAC library into your process.

TheXenocide
  • 1,060
  • 8
  • 22