Avatar of Russ Suter
Russ Suter

asked on 

Recursively obtain assembly references

I have a simple enough line of code:
AssemblyName[] referencedAssemblies = Assembly.LoadFile(@"C:\Program Files (x86)\MyTestApplication\test.dll").GetReferencedAssemblies();

Open in new window

This returns a valid list of referenced assemblies but I need to go deeper. I need to get all the referenced assemblies of the referenced assemblies (excluding GAC assemblies if possible) but I don't have a full path of the referenced assemblies to load their references. How do I recursively get assembly references like this?
.NET ProgrammingC#

Avatar of undefined
Last Comment
Russ Suter

8/22/2022 - Mon