Loading CLR DAC dll from a different path

From .Net framework 2.0, CLR creates a debugger helper dll mscordacwks.dll. The dll is used by Windows Debugger to enumerate CLR data structures.

Mscordacwks.dll is part of .Net framework redist.

C:\Windows\Microsoft.NET\Framework\v2.0.50727>dir mscordacwks.dll

 Volume in drive C is Vista

 Volume Serial Number is C84C-2424

 Directory of C:\Windows\Microsoft.NET\Framework\v2.0.50727

07/10/2007 04:38 PM 812,544 mscordacwks.dll

               1 File(s) 812,544 bytes

When debugging a .Net framework application, Windows Debugger loads the CLR DAC dll based on where CLR (mscorwks.dll) is loaded.

You can use .cordll command to ask Windows Debugger to load the CLR DAC dll from a different path.

.cordll -lp c:\otherpath

Windows Debugger may have cached the CLR DAC dll. So you may have to unload it first.

.cordll -u -lp c:\otherpath

Full documentation on .cordll below:

.cordll (Control CLR Debugging)

The .cordll command controls managed code debugging and the Microsoft .NET common language runtime (CLR).

Syntax

.cordll [Options]

Parameters

Options

One or more of the following options:

-l

Loads the CLR debugging modules.

-u

Unloads the CLR debugging modules.

-e

Enables CLR debugging.

-d

Disables CLR debugging.

-D

Disables CLR debugging and unloads the CLR debugging modules.

-N

Reloads the CLR debugging modules.

-lp Path

Specifies the directory path of the CLR debugging modules.

-se

Enables using the short name of the CLR debugging module, Mscordacwks.dll.

-sd

Disables using the short name of the CLR debugging module, Mscordacwks.dll. Instead, the debugger uses the long name of the CLR debugging module, Mscordacwks_<spec>.dll. Turning off short name usage enables you to avoid having your local CLR used if you are concerned about mismatches.

-ve

Turns on verbose mode for CLR module loading.

-vd

Turns off verbose mode for CLR module loading.

Comments