David Reis
David Reis

Reputation: 13000

Is there a way to figure out which .net symbols an assembly uses from a dependant assembly?

Given an assembly A, that refers to Assembly B, how can I figure out methodically all the symbols (classes, constants, enums, etc) that A uses from B? Is there any tool that can tell me that?

PS: I need it to analyse how "entrenched" is the dependency

Upvotes: 2

Views: 90

Answers (3)

KeithS
KeithS

Reputation: 71573

If you have ReSharper, open assembly A in VS and expand the project's References folder. Right click on the reference to B, and select "Find Dependent Code". ReSharper will navigate though your project and find all uses of types contained in B.

Upvotes: 0

dthorpe
dthorpe

Reputation: 36082

One low-tech way to discover dependencies: In Visual Studio, open assembly A's project. Remove assembly B from A's list of assembly references. You can do a build, or just wait for the auto errors to start filling up the error list window.

Presto, a pretty comprehensive list of what and how much A needs from B.

Upvotes: 0

Vinay B R
Vinay B R

Reputation: 8421

Checkout NDepend for visual studio. This articles discusses it in detail.

Upvotes: 1

Related Questions