22

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

8 Answers 8

10

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

Sign up to request clarification or add additional context in comments.

Comments

10

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.

Comments

10

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

3 Comments

After dependency walker failed to help me (does not show any .net assemblies referenced by the target library), I searched for a specific .net dependency app and this did the trick. Easy to read and will discover and alert if there are circular dependencies.
Works as advertised. Only shows managed dependencies (is it even possible to automatically show unmanaged dependencies of a managed app?) Free version only shows hierarchy, not graphs. (Make sure to hit Decline during free version install to avoid getting add-on wares.)
I don't know if this changed recently but the unpaid installer installs unwanted crapware like a "registry cleaner" and "search protect" I would avoid installing this program!
6

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:

NDepend dependency graph NDepend dependency matrix

Comments

3

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.

Comments

2

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.

IL DASM

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

IL DASM MANIFEST

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

Comments

1

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

Comments

0

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

1 Comment

I think this is not correct. It will detect the dependencies to native assemblies, yes, but it will not detect/see dependencies to .NET assemblies. For example, it will show a dependency to, say, kernel32.dll, but it won't show dependencies to, say, System.ServiceModel.dll. Can you elaborate?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.