Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find out dependencies of all DLLs?

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?

like image 719
Abhijeet Avatar asked Feb 27 '13 13:02

Abhijeet


People also ask

Do DLLs have dependencies?

When you use depends.exe, be aware that a DLL might have a dependency on another DLL or on a specific version of a DLL. You can use depends.exe on either the development computer or on a target computer. On the development computer, depends.exe reports the DLLs that are required to support an application.

How do I find the dependencies of a .NET DLL?

Load your DLL into it, right click, and chose 'Analyze' - you'll then see a "Depends On" item which will show you all the other dll's (and methods inside those dll's) that it needs.

What is DLL dependency?

When a program uses a DLL, an issue that is called dependency may cause the program not to run. When a program uses a DLL, a dependency is created. If another program overwrites and breaks this dependency, the original program may not successfully run.


1 Answers

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.)

like image 124
Jon Skeet Avatar answered Sep 21 '22 17:09

Jon Skeet