Find out dependencies of all DLLs?

Abhijeet picture Abhijeet · Feb 27, 2013 · Viewed 58.3k times · Source

I have a collection of DLLs(say 20). How do I find out all the DLLs on which one specific DLL (say DLL A) is depending upon?

Answer

Jon Skeet picture Jon Skeet · Feb 27, 2013

If you mean programmatically, use Assembly.GetReferencedAssemblies.

You can use that recursively to find all the assemblies you need. (So you find the dependencies of X, then the dependencies of the dependencies, etc.)