简体   繁体   中英

List of Assemblies in a different project within Solution VS2010

My Solution(VS2010) has many projects.

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. Note that this will also include referenced framework assemblies.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM