Visual Studio Tips and Tricks – Checking code dependencies visually

VisualStudioLogoEver had to make changes to someone else’s code or figure out what might be impacted by a change to a class? You will love the ability to visualize the structure of the code.

FYI – this feature is only available in Visual Studio Ultimate. If you are a student and you have access to DreamSpark Premium you can get Visual Studio Ultimate for free! If you are in a technical program and don’t have DreamSpark Premium, talk to your professor about getting all the students in your program the best development software for free!

  • Ever had to fix a bug in someone else’s code?
  • Ever had to make changes to code you wrote a year ago but haven’t touched in months so you don’t really remember how you set up all the classes?
  • Ever tried to explain how code you wrote is structured to another developer or a professor?
  • Ever had to figure out what to retest or what might be impacted by a code change?

If you answered yes to any of these questions, you will appreciate the ability to show code dependencies visually. This feature requires Visual Studio Ultimate, but it’s incredibly easy to use!

1. Open your project in Visual Studio 2012 ultimate.

2. From the menu select Architecture | Generate Dependency Graph | For Solution

You will see the dlls that make up your solution. I’ve created a dating service Windows Phone app that doesn’t call any external dlls so at first it looks pretty unimpressive.


3. Expand the dll that contains your code and you can drill down to see a dependency graph that shows each of your classes.


So instead of reading through all that code to try and figure out how you structure your classes, you’ve got a quick and easy way to visualize it right at your fingertips! This also helps when you are about to make a change to one of the classes and aren’t sure what code might be affected by your change.

If you have any tricks for checking code dependencies or navigating through code, please share! I’ll keep all the VIsual Studio tips and tricks I share here!

Skip to main content