Click here to Skip to main content
Licence CPOL
First Posted 22 Sep 2005
Views 49,197
Downloads 1,322
Bookmarked 63 times

Build Automation Using C#, Visual Studio, Source Safe, InstallShield and NullSoft Installer

By | 14 Oct 2008 | Article
Automating the Application Build Process
Sample Image - BuildMaster01.gif

Introduction

This application is written in C# using .NET Framework 1.1 and uses an XML file for configuration.

BuildMaster will do the following:

  • Gets latest source safe for the solution and each of its projects [Uses VSS Component Model].
  • Cleans the solutions if required.
  • Builds the solution using the EnvDTE objects exposed by Visual Studio.
  • Stamps each DLL and executable with the current version number.
  • Copies and moves files according to configuration settings to the target directories.
  • Applies Source Safe Label to solution using the current build number.
  • Creates the installation setup either using Installshield component object model and command line compiler or using Nullsoft command line compiler.
  • Moves the installation executable to the appropriate local or network locations according to configuration.
  • Emails all active recipients in the configuration file letting them know where to get the installation setup from.
  • In case of error, it notifies email recipients that are set up for notify on failure.
  • Email supports regular email and cell phone email or pagers.
  • Auto increment build number or manual override.
  • Provides visual feedback in list view of each action taken.
  • Writes each action to log file as designated in configuration.
  • Supports Release (actions are actually performed) or Debug (FAKE actions are not performed) mode.

Using the Code

This is intended to be used as an application on its own. You might have to make slight modifications, but the purpose is to keep it generic enough that most modifications are handled via the XML Configuration Settings.

Points of Interest

I used a delegate for the events to be sent to the form as the actions were being performed by the background threads. This keeps the UI alive and provides a nice visual feedback to the user.

You may contact me at jfranklin.pena@gmail.com.

History

  • 22nd September, 2005: BuildMaster Version 1.7.0.2100
  • 14th October, 2008: Updated the download for Visual Studio 2008

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

FranklinPena

Architect

United States United States

Member

Life is good, love writing code, designing solutions, flying, playing chess, photography, and yes riding my Susuki SV650 as fast as I can for as long as I can.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralExcellent! PinmemberNHVirtuoso9:50 18 Oct '05  
GeneralRe: Excellent! Pinmembertobiejean3:36 12 Jan '06  
QuestionWhy? Pinmemberfreroquanto7:21 22 Sep '05  
AnswerRe: Why? PinmemberSergio Pereira5:31 23 Sep '05  
QuestionNAnt and CC.NET? PinmemberMichael Kennedy7:13 22 Sep '05  
AnswerRe: NAnt and CC.NET? PinmemberDanPetitt5:39 23 Sep '05  
GeneralRe: NAnt and CC.NET? PinmemberMichael Kennedy6:46 23 Sep '05  

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.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 14 Oct 2008
Article Copyright 2005 by FranklinPena
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid