views:

357

answers:

7

Is there a good tool that will look at a .NET assembly and tell you all of the dependencies it has on other assemblies? Sort of like the old depends.exe from VS6 days.

UPDATE
I guess the one thing that I am missing from Reflector is verion #'s. Unless I am missing something. How do I tell what framework is required by an assembly?

I'm trying to solve this other issue I am having:
http://stackoverflow.com/questions/922681/ironpython-click-once-net-2-0-error-thoughts

From the error message it looks like I need:
Microsoft.Linq.Expressions.Compiler.Snippets
Microsoft.Linq.Expressions.Compiler.LambdaCompiler

Other than the app blowing up on me... how should I have detected a need here? It runs fine on my machine.

Is this a 3.0 or 3.5 thing?

+1  A: 

NDepend
But I think it is not free.

EDIT: Reflector Open the assembly. Right click -> Analyze. It will show which assemblies, the current assembly depends upon.

shahkalpesh
NDepend isn't equivalent to 'depends.exe' - it shows code dependency, not which DLL files are required and their versions.
Kieren Johnstone
+9  A: 

Umm, .NET Reflector?

Edit: To find detailed information on the assemblies required by a given assembly, load the assembly into Reflector, and expand the namespace. You should see the assembly name listed. Expand that and you will see "References". Expand References to view the assemblies required. Selecting one of those will give version and name info below.

Hope that helps.

Dan Shield
A: 

Reflector has some addins that should help with this.

RedFilter
+4  A: 

The FusionLog utilities should help you track down what assemblies are being looked for and where it was searching for and finding them, or not. It will also tell you the version being searched for. (And it comes as part of the .NET SDK)

David McEwing
+1  A: 

If you want a tool that comes with the Microsoft SDK (rather than third party) use ildasm.exe, the .NET assembly disassembler. While it won't show code in anything but IL, it will show metadata, names and assembly dependencies.

Richard
+3  A: 

The best equivalent of depends.exe for .NET, i.e. a tool that shows what assemblies are loaded at runtime (as opposed to Reflector's static(?) analysis) is the MS Assembly Binding Log Viewer (or fuslogvw among friends :)

It logs all assembly loading infomation - including dinamically loaded assemblies.

alt text

Cristi Diaconescu
+2  A: 

You could always simply look at the visual Studio Modules view. While debugging, go to: Debug->Windows->Modules. It will list all assemblies that needed to be loaded. There is also a tool called "Dependancy Walker", but I haven't tried that out personally.

Blub