TechBubbles Microsoft Technology BLOG

Dependency graphs in Visual Studio 2012

 

Dependency graphs helps you visualise how your code is organised and understand its dependencies. This could be useful when you are working with un-familiar code. You can easily get visual overview of your code by creating dependency graphs.You can create dependency graphs in Visual Studio 2012 ultimate by choosing Architecture menu and then click Generate Dependency Graph –> for solution image

 

image

You can create dependency graphs to get an overview on your solution. The below graph shows the top-level assembly and their dependencies, You can browse the graphs in different ways and you can also rearrange the items on the graph.

image

You can expand assembly to see namespace, class and members . The legends are shown below

imageimage

You can choose messages, items that interest you and create a graph of those items.

image

You can also find all external assembly dependencies that your solution has in externals group.

image

You can also explore the external dependencies by examining the links, the thicker the link the more dependencies that link represent. To explore a specific link , you can create a graph just for the items in that link

image

You can also go quickly and directly to the code from graph. You can find the trouble parts in your code by running an analyzer, for example you can find circular dependencies

image

image

You can further examine these dependencies by creating a graph for the items in the circular reference. Without going to the files and lines of code you can organize your code.

As an example you might be in the middle of code-review , you can create a dependency graph to help you to understand the pending check-in files or code changes, you can then apply pending changes filter in solution explorer then you can choose the related items and can create a graph for those items

image

You can also add notes to that graph to give feedback and save the graph as part of the review. Finally you can edit the graph to pass the thoughts and ideas of about your code without changing the code it self.

Share this post :            

About the author

Kalyan Bandarupalli

My name is kalyan, I am a software architect and builds the applications using Microsoft .NET technologies. Here I am trying to share what I feel and what I think with whoever comes along wandering to Internet home of mine.I hope that this page and its contents will speak for me and that is the reason I am not going to say anything specially about my self here.

Add Comment

By Kalyan Bandarupalli
TechBubbles Microsoft Technology BLOG

Follow me

Archives

Tag Cloud