The steps for using the BuildUp scripts include the following:

  1. Download the latest source and add them to your version control system (VCS)
  2. Setup externals or equivalent in your VCS to include the BuildUp scripts in your project on checkout
  3. Configure your Continuous Integration (CI) server to run the appropriate build scripts

In the following example, we will be using Subversion (SVN) as our VCS, and TeamCity as our CI server software.

Download the latest source

The latest source code for BuildUp can be downloaded on the Source Code tab here - http://buildup.codeplex.com/SourceControl/list/changesets

Setup externals in your VCS

The BuildUp scripts need to be accessible from the CI software running on your build server. Normally, this is best achieved by adding the scripts to your VCS. When your build server checks out the code for your build, it includes the BuildUp scripts as part of the checkout.

Rather than add the BuildUp scripts to your VCS under every individual project folder, it is recommended to add the scripts once, and use externals or an equivalent feature of your VCS to include the BuildUp scripts in a project's checkout. Externals allow only one copy of BuildUp to exist in VCS, but all projects to use those scripts during their build.

For example, you may have the following layout in Subversion:


  • BuildUp
    • branches
    • tags
    • trunk
      • Scripts
      • Source
      • BuildUp.sln
  • MyProject1
    • branches
    • tags
    • trunk
      • BuildUp (external to BuildUp\trunk\Scripts)
      • Source
      • Libraries
      • etc
  • MyProject2
    • branches
    • tags
    • trunk
      • BuildUp (external to BuildUp\trunk\Scripts)
      • Source
      • Libraries
      • etc

Note that you should configure your externals to point to the BuildUp\trunk\Scripts folder. We only require the scripts to run our builds, not the source code.

In TortoiseSVN, you can configure externals using the following steps:

  1. Right click your project's root folder currently checked out on your local hard disk
  2. Select TortoiseSVN->Properties
  3. In the Properties for dialog, select New->Externals
  4. In the svn:externals dialog, select New...
  5. Enter BuildUp as the local path, and http://.../BuildUp/trunk/Scripts as the URL
  6. Commit the folder property change to Subversion
  7. Check that the external setting is configured correctly. When you update your project folder, you should have the BuildUp folder in your project folder's root

Configure your CI server

The BuildUp scripts have been designed to work with TeamCity as your CI server software. TeamCity supports build steps, so is an ideal choice for configuring each BuildUp script as a step in your build, selecting the appropriate script to match the requirements of the step.

The majority of the BuildUp scripts are parametrized, so that you can customize the options they use for your particular build. Parameters are specific to each build script, and can be passed through the TeamCity UI to the script.

As an example of configuring a build script, we will add a build step in TeamCity that builds a ClickOnce package as a TeamCity artifact using the DeployClickOnce.buildup.proj BuildUp script.

  1. Create a new build configuration in TeamCity, this will be run manually to produce a ClickOnce package when required
  2. Change your build number format to be a valid ClickOnce version number, e.g. 1.0.0.{0}
  3. Set up a Subversion root with the URL http://.../ProjectName/trunk. Note that your VCS checkout mode will need to be set to Automatically on agent (if supported by VCS roots) to include your externals on check out.
  4. Add a checkout rule to check out the BuildUp folder to the root of the project +:BuildUp => .
  5. Add a Build Step with the following properties:
    1. Runner type: MSBuild
    2. Step name: Deploy
    3. Build file path: DeployClickOnce.buildup.proj
    4. MSBuild version: Microsoft .NET Framework 4.0
    5. MSBuild ToolsVersion: 4.0
    6. Run platform: x86
    7. Command line parameters: /p:ProjectPath=Source\MyDesktopProject\MyProject.csproj;ClickOnceApplicationVersion=%system.build.number%
  6. Set up an Additional Build Feature, the AssemblyInfo patcher to update the assembly version numbers to the build.number
  7. Set up an Artifact path (under General Settings) which will take all of the output of the build (by default a subfolder of the project root called Package). For example:

Package\**\*.* => MyProject-%system.build.number%.ClickOnce.Release.zip

Last edited Mar 20, 2012 at 3:32 PM by devdigital, version 27


No comments yet.