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:
- 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.
- Don’t modify the solution sources in TFS and let the developers do what they want.
- The BuildNumber of my build must contains the AssemblyFileVersion so that my build name, label and drop location are easily identifiable.
- Don’t modify the version numbers when doing a gated checkin or a private build.
- 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: