1
votes

How to increment the Assembly version on each build in TeamCity using Build Runner Type Visual Studio Sln File?

2

2 Answers

4
votes

TeamCity 6.5 and above come with an AssemblyInfoPatcher which you can configure with a static value or with TeamCity variables. The simplest approach if you just want to change the version number.

  • Edit your build configuration
  • Edit Build Step
  • Add build feature
  • Select AssemblyInfo patcher
  • select the variable(s) to use for your version number

note: this simple feature assumes that your assemblyinfo files are in the default location (under Properties).

3
votes

TeamCity 6.0 allows to create multiple build steps for your build configuration. So, with a first build step you can run some script which increases Assembly version (you can obtain it from current build number as build.number system property). The second build step will run real sln runner.