views:

52

answers:

5

I've been tasked with researching some .NET code that isn't mine. It's a little hard to figure out because there are so many hooks in different areas. In other words, everything seems to be very highly coupled.

I'd like to be able to do the following:

  1. Very easily see a hierarchical (tree) view of projects and their direct dependencies (not just references)

  2. Be able to easily (visually) trace specific API hooks back from a dependent class to it's dependency. For example: If ProjectA.ClassA.Method1() has a call to ProjectB.ClassB.Method2() within the method, I want to be able to see it

And hey, maybe visually isn't the best way to go. But it seems to always work better for me that way. I'll take any and all suggestions of course.

+1  A: 

You can do that with the VSTS Architecture Explorer (included in Architecture Edition or Team Suite). Also the Resharper 5 (beta) Code Inspector offers some functionality for this.

If you need the feature only temporary, you can try the Visual Studio 2010 Ultimate RC. It's freely available and includes the Architecture Explorer.

TToni
+3  A: 

NDepend is awesome for this sort of thing. It's a little pricey, but you can get quite far with the free trial.

Phil Nash
A: 

Structure101 gives you this in both graphical and list/treeview formats. It's commercial but not expensive, and you can abuse the trial license if it's a quick job.

Chris Chedgey
A: 

Here's more information about creating dependency graphs from .NET code in Visual Studio 2010 Ultimate (formerly Architecture Edition / Team Suite):

How to: Generate Graph Documents from Code: http://msdn.microsoft.com/en-us/library/dd409453%28VS.100%29.aspx#SeeSpecificSource

How to: Find Code Using Architecture Explorer: http://msdn.microsoft.com/en-us/library/dd409431%28VS.100%29.aspx

RC download: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=457bab91-5eb2-4b36-b0f4-d6f34683c62a.

Visual Studio 2010 Architectural Discovery & Modeling Tools forum: http://social.msdn.microsoft.com/Forums/en-US/vsarch/threads

Esther Fan - MSFT
A: 

To complete the Phil answer on graphs generated by NDepend see screenshoots extracted from this blog post: Interactive Code Dependencies Graph Note also that you can try NDepend straight on your code thanks to a Free Trial Edition.

alt text

alt text

alt text

alt text

Patrick Smacchia - NDepend dev