Nugetter versioning question

Mar 18, 2013 at 9:42 PM
To start off, I love nugetter. At my office we're able to support multiple internal nuget packages with tfs builds because of this.

I have ran into an issue that I would really appreciate some clarification/ help on. I have tfs build definition using the nugettermultipkgbuildversionedtemplate20.xaml. My goal is to kick off a build, and then let the template create the nuget package with an auto incremented version number. Currently I have set the version patter to 1.0.b. This appears to work great as it is auto-incrementing on any given day, but it seems every night that this resets. Back to 1.0.0. So essentially each day the version number has reset.

What mechanism or concept am I missing to allow tfs to maintain the current nuget version number?

Any help or comments would be greatly appreciated thanks.
Coordinator
Mar 19, 2013 at 1:50 PM
osikes,

I appreciate the compliment, thanks!

What you are trying to do is easy to set up. The "b" pattern takes its value from the build number that gets set as a result of the Build Number Format in the Build Definition. The default configuration for that is "$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)" where the "$(Rev:.r)" is the build number. Any time the non-build number value changes, the build number resets. Because it has $(Date:yyyyMMdd) in it, it will change every night at midnight and the build number goes back to 1.

So, if you modify the Build Number Format to haves a "more static value" in it, the build number will simply continue to increment on every build. When you want the build number to reset, just modify the Build Number Format. You could put a name in there or a high level version number - anything you want really. Just make sure the "$(Rev:.r)" is at the end so NuGetter will have a value to work with.

Regards,

Mark
Mar 19, 2013 at 6:00 PM
Thank you so much, that completely solves my problem. :)