Click here to Skip to main content
6,822,613 members and growing! (18,054 online)
Email Password   helpLost your password?
Web Development » Trace and Logs » Debug and Tracing     Intermediate License: A Public Domain dedication

Project dependency graph generator

By iLFiS

Tool for generating project dependency graph in VS 2003.
C#, Windows, .NET1.1VS.NET2003, Dev
Posted:26 Sep 2004
Views:65,326
Bookmarked:18 times
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
8 votes for this article.
Popularity: 2.88 Rating: 3.19 out of 5
2 votes, 25.0%
1
1 vote, 12.5%
2
1 vote, 12.5%
3
1 vote, 12.5%
4
3 votes, 37.5%
5

Sample Output Image

Description

DepGraph is a tool which generates a PNG image showing a build dependency graph of a project in Visual Studio. Is uses the graphviz tools from here. The picture above shows the generated dependency graph of one of my solutions. It uses the similar ideas as in Dependency-Grapher for C++ Projects by SteveKing.

Installation

  1. Install graphviz from here.
  2. Copy compiled executable to some folder.
  3. Enjoy to use!

Background

I have developed a large program in C++, in command of many developers. These people produce too many modules, which realize different functionality. Many modules (usually Static C++ or Dynamic libraries) use other modules. For compiling the result, it is necessary to set the correct build dependencies. The problem is that VS has a trouble with incorrect or ring dependencies. It results in producing too many warning messages about symbols' multiple definition. Some amount of these messages can appreciably increase compile time. And more over, incorrect dependencies can crash the linker to internal error! Controlling and supporting dependencies by hands is difficult. This tool will help you (I hope) to solve your problems in solutions with many-many separate projects. And will provide some information about the cause of troubles, if you meet them.

Usage

To use this tool, make the following:

  1. Run Visual Studio.
  2. Open solution whose project dependencies you want to display.
  3. Just run the tool without any parameters.

Program makes the following:

  1. Determines that Visual Studio is running.
  2. Determines which solution is currently open in VS, and directory where sln file is located.
  3. Generates a Build dependency graph in the same directory as the sln file. Name of this file will be solution_dep.png.

Please note that the picture files may become really huge for solutions with many projects!

Note: In the same directory as the solution file can be a file with name depExcl.txt. In this file, you can specify names of the project (one per line, case insensitive) dependencies which must not be displayed. It's useful for frequently used projects, from which depends many other projects, for entity link decrease. Projects listed in this file will be displayed on the diagram in a different color. (See project versionInfo on picture above.) This file can contain comments (lines beginning aith '#'). Here is an example of depExcl.txt.

Project1
#Project2 Here is a comment!
Project3

Conclusion

There are a lot of improvements possible like a better ordering of the dependency graph and the like. Some of you might find the colors awful - feel free to change that :). Also, I think it's a good idea to make this tool as a plug-in for Visual Studio. I you find some mistakes - please do not beat me with rocks, it is my second C# program (first of it is "Hello world!") :).

Points of Interest

Ho! I like to listen to Metal music while coding! :)

History

September 29 2004 - Initial release.

License

This article, along with any associated source code and files, is licensed under A Public Domain dedication

About the Author

iLFiS


Member

Occupation: Software Developer (Senior)
Company: Deutche Bank
Location: Russian Federation Russian Federation

Other popular Trace and Logs articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 20 of 20 (Total in Forum: 20) (Refresh)FirstPrevNext
GeneralSimular tool, but also for visual studio express edition users Pinmemberjan wilmans23:37 20 Jan '10  
GeneralRe: Simular tool, but also for visual studio express edition users PinmemberAph3x0:38 8 Feb '10  
Generalgraphviz tweaks PinmemberGreg Domjan23:14 30 Sep '09  
GeneralAll characters in project names are little squares PinmemberGontrande9:00 20 Feb '09  
GeneralRe: All characters in project names are little squares PinmemberiLFiS12:58 16 Mar '09  
GeneralVS 2008 update PinmemberMichael Freidgeim14:29 5 Dec '08  
GeneralVS2005 Update PinmemberKurnia Kosasi8:28 24 Sep '07  
NewsMessage Removed PinmemberElliot Rice22:36 23 Aug '07  
GeneralOutput in SVG PinmemberAgeKay1:14 10 Oct '04  
GeneralRe: Output in SVG PinmemberGreg Domjan23:19 30 Sep '09  
Generalcrash at proc start Pinmembergn47112:09 6 Oct '04  
GeneralRe: crash at proc start Pinmembergn47113:29 6 Oct '04  
GeneralGraphViz vs. Netron PinmemberNetronProject21:36 4 Oct '04  
GeneralRe: GraphViz vs. Netron Pinmemberizz23:16 22 May '05  
GeneralRe: GraphViz vs. Netron PinmemberNetronProject1:13 23 May '05  
GeneralRe: GraphViz vs. Netron Pinmemberizz5:33 31 May '05  
GeneralCrash Pinmemberzoomba7:09 27 Sep '04  
GeneralRe: Crash PinmemberMatthew Hayhurst8:09 27 Sep '04  
GeneralRe: Crash Pinmembergameweld10:01 5 Nov '04  
Generalnice utility PinmemberSalty Dog5:19 27 Sep '04  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads.

PermaLink | Privacy | Terms of Use
Last Updated: 26 Sep 2004
Editor: Smitha Vijayan
Copyright 2004 by iLFiS
Everything else Copyright © CodeProject, 1999-2010
Web17 | Advertise on the Code Project