How to Get Recursive List of Dependencies

1.3k views Asked by At

Starting from a single assembly, I would like to be given a recursive list of all its assembly dependencies. I want the dependency to be determined by the assembly manifest of each assembly. In other words, I don't want to have an assembly dependency omitted from the list merely because it is "not actually called" or "not actually used."

I tried using Visual Studio Ultimate 2012 "Architecture->Generate Dependency Graph". The diagram it presents does not recursively show external dependencies and so it does not meet my need. I also started the 14 day trial of NDepend just now. It also does not show me a recursive graph of dependencies.

It may be that either Visual Studio or NDepend might have shown me recursive dependencies, if each of the recursive assemblies were actually referenced by code. But again, I'm not asking if there is an execution path that links the dependencies together, I just want to know what the manifest for each assembly declares to be the dependencies.

Is there an option I'm missing in either Visual Studio or NDepend?

It would also be nice to filter the dependencies so that GAC assemblies are omitted from the recursion and list.

1

There are 1 answers

0
Patrick from NDepend team On

You can get such a list, first right click the assembly and ask for assemblies that I use (Directly or Indirectly).

NDepend Select assemblies used recursively

A code query is then shown that lists assemblies used (recursively) with the depth of usage.

NDepend list of assemblies used recursively

Conveniently, you can export these assemblies to the dependency graph and then get a better understading of the code structure:

NDepend assemblies dependencies graph

In other words, I don't want to have an assembly dependency omitted from the list merely because it is "not actually called" or "not actually used.

As far as I understand this particular point is not satisfied. NDepend takes account of a dependency between A and B only if a type of A is using a type of B (or vice-versa).