如何DLL中所使用的appliaction getNames(C#) [英] How to getNames of DLLs used by appliaction (C#)

查看:132
本文介绍了如何DLL中所使用的appliaction getNames(C#)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我期待阅读使用我的应用程序的所有组件(DLL)的方式。
在标准的C#项目有参考的文件夹,当它展开我可以阅读使用的所有库。

I'm looking the way to read all assemblies (DLLs) used by my app.
In standard C# project there is "References" folder, when it is expanded I can read all libs used.

目标是programically(在运行时)读出用在我的解决方案,每个项目的所有程序集。
最后,我想看看库所使用的编译的* .exe程序

GOAL is read programically (in runtime) all assemblies used by each project in my solution.
Finally I'd like to see what libs are used by compiled *.exe application

你认识路?

推荐答案

你看<一href="http://msdn.microsoft.com/en-us/library/system.reflection.assembly.getreferencedassemblies.aspx"><$c$c>Assembly.GetReferencedAssemblies?

请注意,您不使用就不会结束任何引用排放到元数据,这样你就不会看到他们的执行时间。

Note that any references you don't use won't end up being emitted into the metadata, so you won't see them at execution time.

我用 GetReferencedAssemblies 之前递归现在要找到一个名为类型,而无需指定程序集。

I've used GetReferencedAssemblies recursively before now to find a named type without having to specify the assembly.

这篇关于如何DLL中所使用的appliaction getNames(C#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆