TeamBuild 2010: UpdateAssemblyInfo activity sample

TeamBuild 2010: UpdateAssemblyInfo activity sample

As promized her is a sample of how i’m using the UpdateAssemblyInfo activity i’ve published on codeplex.

First let’s describe what we want:

  1. Increment the build number of my AssemblyFileVersion automatically for all the projects in a solution when doing a build. The major and minor versions of the AssemblyVersion and AssemblyFileVersion must not change and the revision number must be 0.
  2. Don’t modify the solution sources in TFS and let the developers do what they want.
  3. The BuildNumber of my build must contains the AssemblyFileVersion so that my build name, label and drop location are easily identifiable.
  4. Don’t modify the version numbers when doing a gated checkin or a private build.
  5. Be able to launch a build and specify to skip versionning.

Before updating our build template i’ll start by configuring my solution to make easier the versionning of all the projects. Let’s add a GlobalAssemblyInfo.cs (or .vb if you use VB.Net) file to the solution as a solution item:

read more →