9

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?

8 Answers 8

4

You could have a look at NDepend : http://www.ndepend.com/

edit to add:

Patrick Smacchia, lead developer of NDepend, blogs here: http://codebetter.com/blogs/patricksmacchia/default.aspx and has written much on the subject of componentisation, which you may find useful.

Sign up to request clarification or add additional context in comments.

Comments

4

If you have access to Visual Studio 2010 Ultimate, you can select Generate Dependency Graph from the Architecture menu.

There is a walkthrough on MSDN: How to: Generate Dependency Graphs for .NET Code

1 Comment

That looks like it does a dependency graph within a solution. In my case, each component is represented by a single solution. I'd like to get a graph showing which component depends on which part of another component. So, it is dependencies across solutions, but with a marker on which solution a particular dependency belongs to.
2

The tool NDepend proposes 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 2017, 2015, 2013, 2012, 2010 and it can show any kind of graph on your code including:

  • dependencies between assemblies
  • method call 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...

This is all explained here.

NDepend code graph dependency diagram

NDepend also proposes a dependency structure matrix (DSM) and a way to query dependencies with C# LINQ queries.

Comments

2

The latest Resharper version is also capable of creating the reference diagramm.

https://www.jetbrains.com/help/resharper/Architecture__Project_Dependencies_Exploration.html#

Comments

1

I'd try importing it into a UML tool that could render the dependency diagram between modules for me.

There are several on the market, both commercial and open source. Get the one that gives you the most capability for your budget.

2 Comments

Are you suggesting manually entering the dependencies into a UML tool? That's quite a bit of manual work I'd much rather not do.
You don't have to generate the dependencies if the tool will generate them for you on import. I can't speak for every tool's capabilities.
1

If you are OK with assembly level information then you should look at Graph add-in to a popular tool Reflector. It provides assembly & class level dependency graph.

Comments

0

understand was suggested to me this morning (:

http://www.scitools.com/

but honestly i cannot give a proper report on it, since it is too expensive for me...

Comments

0

Have a look at my free DSM plugin for .NET Reflector downloadable from www.tom-carter.net

It allows two different views on your dependencies : a deployment model to find the dependencies between assemblies and an architectural model to show dependencies between types.

If it does not provide visually the information your looking for, you can save the model to xml and run your own script on the data.

The advantage of a dependency matrix is that its much more easier to analyse dependencies visually than box and line graphs

If you need more help let me now

[Update] This plugin is now available in form of a Visual Studio Add-In

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.