views:

263

answers:

0

Hi,

I'm reporting a build number to TeamCity from my MSBuild script using the following TeamCity task:

<TeamCitySetBuildNumber Condition="'$(TEAMCITY_BUILD_PROPERTIES_FILE)' != '' " BuildNumber="$(UpdatedVersionInfo)" />

This is called from an UpdateVersion task which generates UpdatedVersionInfo from a global AssemblyInfo.cs

This all works fine when the build succeeds, however if the build fails early in the process, TeamCity displays the build number set in the 'General Settings' tab, e.g. 1.0.0.{0}

Is there anyway around this as the build number has to be generated from the build script, rather than TeamCity.

TIA