12月18日
At Last a (very) good Cross-Reference tool for .NET
Ok, I am old. I started programming professionally with Applesoft BASIC on Apple II in the early 1980s. At that time there were many “cross-reference tools” that would go through your code and find what function each function called – a “call graph” and display it as a list of function and the ones it called.
Software was small but even then the cross-reference tools (there were many!) were useful in order to see the impact of changes, help reorganize the code (we call it “refactor” nowadays), find bugs and so on.
Now I am managing a large health care application that was developed along the years by people that professional courtesy forces me to call “not very careful”. As it is now, there are very few DLLs (including a huge one) and it seems that each method calls every other one, without any layering and any order.
I desperately need to break down the code in sensible layers so I can recode parts of it and plug in new functionality with ease. I desperately need a modern version of my old Applesoft “cross-reference” tools. Of course, a modern version would know about assemblies, classes and would display the “call graph” graphically. I spent many hours on the Web and didn’t quite find anything satisfactory. The closest I got was something called “Total “.NET XRef”, but it didn’t work with .NET 2.0 and it lacked a graphical output. I even entertained the idea of writing such a tool myself – after all, AFAIK the information is all there on the assemblies and can be pulled in by reflection.
Now my prayers were answered: Microsoft came up with such a tool for Visual Studio 2010. It is no longer called “cross reference”, it is called the “Architecture Explorer” - marketing people in action, you see.
Anyway, this "Architecture Eplorer" is reason enough to upgrade to VS 2010 when it is available. Actually, I it’s reason enough to download the 8 GB CTP, put up with the slow speed of the Virtual Machine and keep using it till the cows come home – or Microsoft launches the final version.
Take a look below at XPS file it generated. Inside VS 2010 you can drill down at each module, see classes and methods. This thing is simply Glorious. Hail to the people at Microsoft that came up with this.