BuildNumberPrefix not working


I'm trying to use the BuildNumberPrefix value, but it won't work, it seems to simply don't read the prefix:

Convert Version Pattern00:00:00

InputsBuildNumberPrefix: 0
VersionPattern: 1.0.J.B
BuildNumber: CI - Release - TestApplication_20130610.2

OutputsConvertedVersionNumber: 1.0.13161.2

In the build definition I set "Build Number Prefix" = 1000 under "5. NuGetter (B) - Package" section.

My version is:

dll version: 2.1.13037.3

For the moment I will workaround to that using a different Vesionseed file.


EDIT: I've found the problem and fixed, actually the BuildNumberPrefix was correctly added for the MultiPkg but not for the single one. At the moment I cannot connect to the svn and push a patch, so I've attached the sources.

file attachments


0v3rCl0ck wrote Jun 11, 2013 at 10:04 AM

The NuGetter Processor is reading the right value, but at the moment I can't understand while is not passing to the Convert Version Pattern module, need to check better the names, but they are seems to be good:

NuGetter Processor 00:00:35


NuGetterSwitchInvokePowerShell: False
NuGetterNuGetExeFilePath: $/BuildActivities/Utilities/NuGet.exe
NuGetterVersion: $..../VersionSeed.Release.xml
BuildDirectory: C:\a
BinariesDirectory: C:\a\Binaries
NuGetterPushDestination: http://...../nuget
NuGetterOutputDirectory: NuGetPackage
NuGetterBuildNumberPrefix: 1000
Workspace: .._.._main;LOCAL AUTHORITY\Elastic Build
NuGetterSwitchInvokePush: True
SourcesDirectory: C:\a\Sources
NuGetterNuSpecFilePath: $/.....nuspec

marknic wrote Jun 12, 2013 at 2:54 PM

Are you having issues versioning the NuGet package or the assemblies within the package because that's two different things. TfsVersioning will version the assemblies while NuGetter will version the NuGet package.

You can use both together to manage the versioning of the assemblies and package but NuGetter alone will only change settings on the package.

The template: NuGetterMultiPkgBuildTemplate20 does not utilize TfsVersioning. NuGetterMultiPkgBuildVersionedTemplate20 uses TfsVersioning but you have to include the assembly in the custom assemblies location. (http://tfsversioning.codeplex.com)


0v3rCl0ck wrote Jun 12, 2013 at 4:50 PM

Thank's mark for replying.

Actually I'm having problem versioning the NuGet pakcage, I would like to have the NuGet package version plus Build Number Prefix, is that the meaning of that field isn't it?

The strange thing is that even if in every step I see that the prefix value is passed over and over, the ConvertVersionPattern class seems to don't receive it.

thank again,

wrote Jun 28, 2013 at 6:37 PM

wrote Jun 29, 2013 at 12:15 AM

0v3rCl0ck wrote Jun 29, 2013 at 12:15 AM

Hi again,

I think I've found the problem in the build process template, the variable "NuGetterBuildNumberPrefix" isn't passed to the "Convert Version Pattern" activity:


hope this can help.

wrote Jul 1, 2013 at 3:14 PM

wrote Jul 1, 2013 at 3:14 PM

marknic wrote Jul 3, 2013 at 5:24 AM

Added the variable as shown above. Thanks for the input.