我如何列出所有加载的程序集?加载、程序

由网友(╒妳的半步╤我的天崖╕)分享简介:在.NET中,我想列举所有加载的程序集在所有应用程序域。这样做是为了我的程序的AppDomain中是很容易 AppDomain.CurrentDomain.GetAssemblies()。我是否需要以某种方式访问​​每个应用程序域?或者是有已经执行此工具?In .Net, I would like to enumer...

在.NET中,我想列举所有加载的程序集在所有应用程序域。这样做是为了我的程序的AppDomain中是很容易 AppDomain.CurrentDomain.GetAssemblies()。我是否需要以某种方式访问​​每个应用程序域?或者是有已经执行此工具?

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(). Do I need to somehow access every AppDomain? Or is there already a tool that does this?

推荐答案

使用Visual Studio

附加一个调试的过程(例如开始调试或调试>附加到进程) 在调试时,显示模块窗口(调试>窗口>模块)

这给了每个组件,应用程序域的详细信息,并有几个选项来加载符号(包含调试信息,即pdb文件)。

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

使用进程管理器

如果你想要一个外部工具,您可以使用的Process Explorer (免费软件,由Microsoft发布)

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

点击一个程序,它会显示所有使用的组件列表。该工具是pretty的好,因为它显示了其他信息,如文件句柄等。

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.

编程

检查this SO 问题,解释如何做到这一点。

Check this SO question that explains how to do it.

阅读全文

相关推荐

最新文章