9
votes

Is there any way to get TeamCity's build numbering to match the publish version (ApplicationRevision) number generated by MSBuild's publish task?

1

1 Answers

13
votes

You can control the build number in TeamCity via a specially formatted message in the build log. This can be output at any stage (e.g. during publish) and will cause the initially assigned build number to change. See here for more info.

For example, our msbuild has this to output the version as the build number:

<Message Text="##teamcity[buildNumber '$(FullVersion)']"/>