FTDTFSVersion fails every other build attempt if BuildNumber is updated


When I include the following on the FTDTFSVersion task
  <Output TaskParameter="Version" PropertyName="BuildNumber"/>
the build number does not increment properly and every other build attempt fails with "TF42064: The build number '1.1.0225.14' already exists for build definition '\RXD_RXG_PTF\RXP Eventing V2 (CheckinBuild)'."
In the above example this should have been build 1.1.0225.15 since the LastGoodBuildNumber and LastBuildNumber were 1.1.0225.14. Once it fails it records the LastBuildNumber as "RXP Eventing V2 (CheckinBuild)_20080813.14" which for some reason allows the subsequent build to succeed. Attempting build 16 fails and when requested again it succeeds. Build 17 then fails and subsequently succeeds.
The TFSBuild.rsp
Closed Aug 15, 2008 at 1:48 PM by FreeToDev


FreeToDev wrote Aug 14, 2008 at 8:45 AM


I would not recommend using the (or any) task to update the BuildNumber property. If you look at the sample here (http://freetodev.spaces.live.com/blog/cns!EC3C8F2028D842D5!547.entry), you will see that I use

• <Output TaskParameter="Version" PropertyName="NewVersion"/>

Rather than

• <Output TaskParameter="Version" PropertyName="BuildNumber"/>

If you have any failures, then you are going to see clashes like you are seeing below. The task is designed to simply update the version, not change the Build Number, which I prefer to leave at the generated BuildDefinition_Date.Revision, e.g. RXP Eventing V2 (CheckinBuild)_20080813.14. I used to use it to update the build number (and then DropLocation etc), but it caused too many issues.


wrote Aug 15, 2008 at 1:48 PM

wrote Feb 12, 2013 at 10:14 PM

wrote May 15, 2013 at 12:52 AM