How to find all dependencies of a .NET project?

2019-01-17 07:46发布

问题:

Basically, what I need is something like Dependecy Walker, but it should work with .NET applications. Is there anywhere such tool?

回答1:

Reflector - previously from Lutz Roeder, now from Red-Gate software.



回答2:

For .NET 4, check our CheckAsm: http://www.amberfish.net/



回答3:

I prefer ILSpy. It's an open-source .NET assembly browser and decompiler. And yes, it shows dependencies.

Decent replacement for Reflector which is not free anymore.



回答4:

NDepend is the .NET tool specialized in dependencies management and visualization. The tool proposes both a dependency graph and a dependency matrix. A free trial of the tool is available here. Here are 2 screenshots of the dependency graph followed by the dependency matrix:



回答5:

During runtime Systernals' ProcessExplorer might be helpful to see an assemblys dependencies.

Also NDepend can show you the dependencies and how tightly your components are coupled.



回答6:

Reflector is not free and the other one is not free either, just a trial. I had the same problem and found this EXCELLENT tool:

http://www.codeproject.com/Articles/246858/Depends4Net-Part-1



回答7:

Dependency Walker will work with .Net too.

the .Net layer still needs to call down to the core Windows functions like LoadLibrary and GetProcAddress to do the actual work. It is at this core level that Dependency Walker understands what is going on. So, while Dependency Walker may not understand all the language specific complexities of your application, it will still be able to track all module activity at a core Windows API level.

Reference



回答8:

ildasm.exe works for this purpose as well.

This tool is automatically installed with Visual Studio. To run the tool, use the Developer Command Prompt (or the Visual Studio Command Prompt in Windows 7).

ildasm.exe lists a tree of namespaces, types, methods, etc. on loading an assembly.

And you can view all dependencies of the assembly by double clicking MANIFEST, and searching for lines starting with .assembly extern.

ildasm.exe comes with Visual Studio or .NET SDK installations, so chances are you've got it on your computer.