1

How can I get all the assemblies related to a namespace?

For example, if I have "using System" in my project, then I want to have an array of the assemblies "System.Console, System.Private.CoreLib ...".

GBI
  • 171
  • 5

1 Answers1

0

I don’t believe it works that way. The IDE (and compiler) searches for the namespaces you’ve included in your code with using statements, but it only performs this search against assemblies that your project references.

At best, you could manually search through the namespaces included in your referenced assemblies and perform string comparisons on what you get back. But then you’d end up with a list of your referenced assemblies and their matching namespaces.

Victor Wilson
  • 1,720
  • 1
  • 11
  • 22