listdll doesn't see assemblies loaded

537 views Asked by At

I was pretty sure that the .NET runtime loads assemblies as ordinary dlls. But I found that when I connect "native" debugger to the managed process - I don't see the assemblies loaded.

The same thing applies to Sysinternals tool - listdll. It sees only dlls loaded, not assemblies.

I wonder how the CLR loads and executes the code from assemblies? I there a tool similar to listdll to go over all managed processes and list all loaded assemblies?

1

There are 1 answers

0
M.A. Hanin On

First and foremost, an assembly isn't a DLL. A DLL is a physical file, while an assembly is a logical concept of the .NET framework. A single DLL may contain several assemblies.

There are many ways to list the assemblies loaded by a process, here are some of them:

  1. Using SysInternals Process Explorer, double-click the process and switch to the .NET Assemblies tab.
  2. Using a debugger like WinDbg/CDB/NTSD, attach to the target process, load the SOS extension by entering the command .loadby sos clr, then enter the !DumpDomain command to list the assemblies loaded into each AppDomain
  3. Using the MDbg debugger, attach to the target process, then enter the command list assemblies