Unable to find module 'mscorwks.dll'
Asked Answered
K

5

33

I try to use the winDBG to debug a dump file. When I run .loadby sos mscorwks.dll

It gave me an error message. Unable to find module 'mscorwks.dll'

Has anyone seen this before?

Keelin answered 14/9, 2009 at 6:21 Comment(0)
H
14

Don't add the .dll, try just .loadby sos mscorwks

Hydrostatics answered 14/9, 2009 at 6:24 Comment(2)
This still gives error message Unable to find module 'mscorwks.dll' for meDroop
This still gives error message Unable to find module 'mscorwks.dll' for meDemean
C
123

If you are debugging a .NET 4.0 application, you need to use the following instead of mscorwks:

.loadby sos clr

Here is a good overview of the commands available for different versions of the FULL .NET framework. Enjoy!!

Carilla answered 4/10, 2011 at 14:49 Comment(0)
J
20

I had this issue as well and it turned out to be because the debugger was breaking into the app before the CLR was loaded. I had to let the app run throug further before I could do much of anything.

Doing this in windbg might help:

sxe ld:mscorlib
g
(... breaks again ...)
.loadby sos mscorwks

The 'sxe ld:..' stops on module load.

As Sixto mentions, if you are debugging dotnet 4 apps you'll need to replace the last line with

.loadby sos clr
Javanese answered 11/2, 2010 at 13:49 Comment(1)
Yes, this was my problem. It broke too early. I didn't have to load mscorlib myself, I just let the application go a bit further (until it hit Console.ReadLine(), by writing g before .loadby sos mscorwks.Rhineland
H
14

Don't add the .dll, try just .loadby sos mscorwks

Hydrostatics answered 14/9, 2009 at 6:24 Comment(2)
This still gives error message Unable to find module 'mscorwks.dll' for meDroop
This still gives error message Unable to find module 'mscorwks.dll' for meDemean
J
3

Also ensure you have correct bitness - trying to do this in 64-bit windbg while debugging 32-bit app will give you the same error.

Jeanniejeannine answered 22/10, 2012 at 5:43 Comment(0)
M
2

If you have the .NET framework directory (e.g. c:\Windows\Microsoft.NET\Framework\v2.0.50727) in your path, you can just use

.load sos
Merilee answered 3/10, 2009 at 20:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.