Welcome to MSDN Blogs Sign in | Join | Help

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.

 

Published Monday, August 13, 2007 8:00 AM by junfeng
Filed under: ,

Comments

# University Update - Microsoft .Net - Loading CLR DAC dll from a different path

# “Failed to load data access DLL, 0x80004005” – OR – What is mscordacwks.dll?

Wednesday, February 18, 2009 12:34 PM by Notes from a dark corner

Ever seen this error in a WinDBG/CDB debug session? Failed to load data access DLL, 0x80004005 Verify

New Comments to this post are disabled
 
Page view tracker