troubleshooting Question

Recursively obtain assembly references

Avatar of Russ Suter
Russ Suter asked on
.NET ProgrammingC#
7 Comments2 Solutions328 ViewsLast Modified:
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?
Join our community to see this answer!
Unlock 2 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros