我如何获取我的C#项目之间的依赖关系图 [英] How do I get a diagram of the dependencies between my C# projects
问题描述
nant component1.compile
将编译common,然后编译component1,因为component1依赖于common。 随着时间的推移,共同已经变得相当大。我很确定它可以分成几个较小的组件。那么组件只需要依赖于一些这些较小的共同。这将有望减少不同组件的编译时间。
所以问题:
我想可视化应用程序中所有不同项目之间的依赖关系,同时标记项目所属的组件。你会怎么做?
NDepend附带一个
I have a fairly complex application which has been broken up into multiple components. Each component has a solution file which contains a bunch of projects. So I like to think of this as a component has multiple projects/dlls in it. There is also a "common" component. All the other components depend on "common". So a compile goes like this:
"nant component1.compile"
will compile "common" and then compile component1 since component1 depends on "common".
Over time "common" has become quite big. I'm pretty sure it can be split into a few smaller components. Then components need to depend only on some of these smaller, broken up "common". This would hopefully cut down on compile time for the different components.
So question: I'd like to visualise the dependency between all the different projects in the application while also tagging which component the project belongs to. How would you do this?
NDepend comes with a dependency graph coupled with a dependency matrix. By default you'll get a dependency graph of .NET assemblies and it is not restricted to assemblies of only one VS solution. NDepend is integrated in VS 2010, 2008 and 2005 and it can shows any kind of graph on your code including:
- dependencies between assemblies
- method calling graph,
- dependencies of namespaces inside a VS project,
- dependencies of types inside a namespace,
- classes inheritance graph,
- graph representing classes coupling between 2 components
etc...
See screenshoots extracted from this blog post: Interactive Code Dependencies Graph
这篇关于我如何获取我的C#项目之间的依赖关系图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!