开发者

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开发者_JS百科, 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


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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜