Friday, March 8, 2013

Dependency graph in visual studio 2012- Understand your code better.

Today I came across a new feature of visual studio 2012 called Dependency Graph in visual studio 2012. I thought it will be good Idea to write a blog post about this.

I have written list of visual studio 2012 features post. You can find this at my Visual Studio 2012 page.

What is Dependency Graph?

Dependency graph help you visualize how your code is written and organized and provide view on code dependencies. This is very useful when you are working with a code that you have not written. With the dependency graph you can easily get an idea of code written by others in a application.

How to create Dependency Graph:

You can easily create dependency graph via architecture menu –>Generate Dependency graph. You will also presented to two options like below.
  1. For Solution
  2. For Include file.
HowtoCreateDepencyGraph

I have created a basic web form application and created a dependency graph for entire solution like below.

DepecnyGraphWithWebapplicationVisualStudio2012

Here you can see, I have created a blank template dependency graph and its showing me all reference and class that it has included.

There are multiple options provide to create graphs and filter graphs like Assembly,Namespace, Interface, Struct, Enumeration, Delegate etc. Once you click on any block it will provide relationship with other block like following.

RealtionShipWithDependencyGraph

There is a option available in solution explorer to create a graph for particular file(s). Like following.

SolutionExplorerDependencyGraph

and once you click new dependency graph it create graph like following.

GraphCreatedFromVisualStudioSolutionExplorer

There are many more features available with dependency graph like analyser etc. I will write about that in future post. Hope you like it. Stay tuned for more.

Shout it
Share:

0 comments:

Post a Comment

Your feedback is very important to me. Please provide your feedback via putting comments.

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews