Jan 31, 2012 at 9:08 AM


I want to use the standard versionnumber pattern 1.0.J.B, but the B gives a problem when you have multiple builddefinitions on the same solution. TfsVersioning has solved this with the BuildNumberPrefix.

When I looked at the NuGetterVersioningTemplate15.xaml and in the assembly with Reflector, I saw that the ConvertVersionPattern activity supports the BuildNumberPrefix, but it is always set to 0 in the template.

In the NuGetterVersioning template ConvertVersionPattern should reuse the BuildNumberPrefix argument from TfsVersioning. That would solve the problem. I have actually changed my own template for it, but I think it would be good to change it in general.

Regards, Jaap

Feb 3, 2013 at 11:17 PM

I'm missing that feature as well. Would you mind share your modifications?

Thank you.
Feb 4, 2013 at 7:08 AM

Almost at the bottom of the the xaml template with TfsVersioning and TfsNuGetter you find this line:
<tna:ConvertVersionPattern BuildNumber="[BuildDetail.BuildNumber]" BuildNumberPrefix="0" ConvertedVersionNumber="[NuGetterVPackageVersion]" DisplayName="Convert Version Pattern" VersionPattern="[NuGetterVPackageVersionPattern]" />
(At least, this is in the TFS2010 version, I have not yet looked at the 2012 version of the template, but I guess it will not differ much).

In that line, replace the 0 with [BuildNumberPrefix].

That's all,

Feb 4, 2013 at 7:33 AM

thank you, I was hoping that you have changes for the 2012 version. As of NuGetter v2.0 there is different template and the NuGetterProcess activity part is no longer inside this template. It is embedded as a resource in activity dll :-(

Feb 4, 2013 at 7:50 AM
Oh, it's still on my task list to update to the 2012 versions, so I have not yet examined it. Currently I use still the 2010 version, which I modified to work with TFS2012.
Feb 6, 2013 at 1:42 PM
Apparently I didn't realize that BuildNumberPrefix was desired within NuGetter. The feature has been there the whole time (a carryover of common code between NuGetter and TfsVersioning) but a parameter was never included within the build template (the line of XAML code above shows how to add it in the current templates). I am adding that parameter into the templates for your use. I will post an update shortly. I need to create a few tests to verify that it is working as expected. It should but since there's a difference with NuGetter allowing semantic versioning, there could be a conflict when semantic versioning is done along with the build number prefix.

Feb 7, 2013 at 3:44 AM
Version 2.1 was released and includes build number prefix.