简体   繁体   English

解决方案VS2010中不同项目中的程序集列表

[英]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.

相关问题 VS2010:使用解决方案中另一个项目的命名空间? - VS2010: Use namespace from another project within the solution? 在ubuntu上编译VS2010 c#解决方案(项目) - Compile VS2010 c# solution (project) on ubuntu VS2010中的错误打开解决方案-此安装不支持项目类型 - Error opening solution in VS2010 - The project type is not supported by this installation VS2010 + NUnit无法加载程序集? - VS2010 + NUnit failing to load assemblies? VS2010每次编译项目时都会生成不同的程序集 - VS2010 generates different assembly each time compiling the project 构建XNA解决方案(在VS2010中)冻结 - Building XNA solution (in VS2010) freezes LINQPad:使用(.NET4)VS2010程序集时出现“ BadImageFormatException”? - LINQPad: “BadImageFormatException” when using (.NET4) VS2010 assemblies? VS2010(C#)Environment.SpecialFolder.ProgramFiles是解决方案项目中的位置? - VS2010 (C#) Environment.SpecialFolder.ProgramFiles is where in the Solution Project? 在VS2010中将内容导出到多项目解决方案的输出文件夹中 - Exporting content to the output folder of a multi-project solution in VS2010 如何在VS2010中列出解决方案中某些类型的所有对象? - How do I list all objects of certain type in solution in VS2010?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM