How do I list all loaded assemblies?

后端 未结 2 1603
鱼传尺愫
鱼传尺愫 2020-11-27 15:09

In .Net, I would like to enumerate all loaded assemblies over all AppDomains. Doing it for my program\'s AppDomain is easy enough AppDomain.CurrentDomain.GetAssemblies

2条回答
  •  鱼传尺愫
    2020-11-27 15:46

    Using Visual Studio

    1. Attach a debugger to the process (e.g. start with debugging or Debug > Attach to process)
    2. While debugging, show the Modules window (Debug > Windows > Modules)

    This gives details about each assembly, app domain and has a few options to load symbols (i.e. pdb files that contain debug information).

    Using Process Explorer

    If you want an external tool you can use the Process Explorer (freeware, published by Microsoft)

    Click on a process and it will show a list with all the assemblies used. The tool is pretty good as it shows other information such as file handles etc.

    Programmatically

    Check this SO question that explains how to do it.

提交回复
热议问题