[英]List of Assemblies in a different project within Solution VS2010
My Solution(VS2010) has many projects. 我的解决方案(VS2010)有很多项目。
At run time, How do I get list of all the assemblies in a given project? 在运行时,如何获取给定项目中所有程序集的列表?
I can get list of all assemblies within the calling code project by following line of code. 我可以通过以下代码行获取调用代码项目中所有程序集的列表。
Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()
How do I get list of assemblies in a project different than calling code project? 如何获得与调用代码项目不同的项目中的程序集列表?
Please help. 请帮忙。 Thanks
谢谢
A solution may contain projects that are not referenced by the project you currently are executing. 解决方案可能包含您当前正在执行的项目未引用的项目。 I don't know if there is a solid way to retrieve those.
我不知道是否有可靠的方法来检索这些。
However if your calling assembly does contain a reference to the other projects, you can walk through the myAssembly.GetReferencedAssemblies() array. 但是,如果调用程序集确实包含对其他项目的引用,则可以遍历myAssembly.GetReferencedAssemblies()数组。 Note that this will also include referenced framework assemblies.
请注意,这还将包括引用的框架程序集。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.