Click here to Skip to main content
Click here to Skip to main content

Automatic Build Dependencies (ABD) add-in for VC project in .NET 2003

, 2 May 2005
Rate this:
Please Sign up or sign in to vote.
Visual Studio .NET 2003 add-in to set automaticaly build dependencies of VC projects and to generate linked libraries dependency graphs.

Introduction

For quite sometime, I was looking for a way to automatically set the "Build Dependencies" in a given solution of VC projects in VS.NET. I didn't find any tools, add-ins, macro on the web, so, I decided to make my own tool for that.

Also, on CodeProject, I came across iLFis project ("Dependency Graph Generator") that gives the graph of existing Build Dependencies. So, I figured out that it should be nice to have the steps before that. Hence, this add-in automatically sets the Build Dependencies for each VC project in your solution.

Also, it can generate tree graphs of dependencies between VC projects in a solution, based on the linked library set in the properties of every VC project.

The graphs display only the dependencies between existing projects in your solution and not with external third party Libraries/Projects. But the graphs show for each project the entire dependencies tree (not just the first generation libraries it depends on, but the recursive dependencies). It also generates the full dependency tree of your entire solution.

Background

Like iLFis project, on which this project is based, it uses the excellent Graphviz tools to generate the graphs.

Here are the general basic ideas behind this project:

  • For each VC project in the solution, I create an array of the .lib it is linked to (from Additional Dependencies).
  • For each VC project, I keep only linked lib existing in the solution.
  • For each VC project, I recursively remove duplicate entry in a branch.

It has a very basic tree creation/management mechanism.

Restrictions

  • It doesn't detect if you have dependency loops (which is very bad anyway).

Installation

  • Install Graphviz from here.
  • Use the setup.exe installer to install the ABD add-in.

Usage

To use this tool, make the following:

  1. Run Visual Studio .NET.
  2. Open the solution (.sln) you want to work with.

A new pop-up menu is now available in your "Tools" menu: ABDAddin...

  1. Set Build Dependencies: Warning: the tool will update the Build Dependencies in your .sln file. So, if you are not sure of what you are doing, make a duplicate copy of your .sln before using this tool. I will not be responsible for any loss or damage.
  2. ABD Projects Graphs: generate all projects' theoretical Build Dependencies graphs.
  3. ABD Sln Graph: generate the entire solution's theoretical Build Dependencies graph.

You have access to these commands through the context menu in the Solution Explorer and the Class View.

The context menu for your solution now has an ABDAddin pop-up menu. And you can access the "ABD Project Graph" command on the context menu of the selected project. (This one will generate only the graph for the selected project.)

The ABDAddin has also an Options page in the "Tools-Options" form:

Points of Interest

This personal C# project was actually my first attempt with this language. I come from C++/MFC/OpenGL world. So for sure, this code will have multiple updates to enhance its performance since I have written basic C# code (as a C++ developer, the current code looks ugly for me).

For version 2.0, I didn't improve much on the core code Auto Build dependencies, but I mainly spent time on understanding the Command, CommandBars, and VS add-in capabilities.

History

  • Version 1.0 January 28th 2005 - Initial release.
  • Version 2.0 - February 16th 2005
    • Transform the tool to a Visual Studio .NET add-in.
    • Can generate graphs independently by setting the Build Dependencies.
    • Can generate graph of selected project from Class View and Solution Explorer context menu.
    • Add Add-in options in "Tools-Options" in order to choose output folder, configuration type.
    • Output graph in Visual Studio.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Lionel Grenier
Web Developer
France France
I am a Software Engineer, located in Paris(France), working in the Financial Data field.

Follow on   Twitter

Comments and Discussions

 
Questionvs 2008 Addin ? Pinmemberbouifcra30-Sep-09 2:15 
GeneralMacro to Update Build Dependencies in VS 2005 Pinmemberrs1@pobox.com24-Apr-07 8:44 
QuestionGraphviz won't run...no images? Pinmemberhgohel5-Apr-05 11:02 
Looks like a nice add-in, but I can't make it work for me...
 
I had Graphviz 1.7, just upgraded to 2.0 also, but I can't get ABD to run properly. I get a web page with the name of the project or solution and a placeholder for the image with a red X in it (image not found).
 
When I open up a cmd window, I can run 'dot' without any path specification because it's installed in the default location and it's in the system PATH. Path is C:\Program Files\ATT\Graphviz\...
 
I looked at the solution directory and I found the lib*.txt files created by ABD and I could manually run 'dot -Tpng lib.txt -o ' and rename them to the filenames that the HTML page is expecting, but that's not a good solution Smile | :)

 
Himanshu

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

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

| Advertise | Privacy | Mobile
Web03 | 2.8.141022.2 | Last Updated 3 May 2005
Article Copyright 2005 by Lionel Grenier
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid