Customize nuget version

I had setup continuous integration with TFS2013 using OctoPack but when build is trigger getting different version number but we would like to customize build version as per our build release for Eg or
can you please help me to define version number as per our requirement.


Thank you for your email : I am on PTO and I will be back to the office on 16/August/2017, with no access to emails.
I will respond to your emails as soon as possible upon my return.

This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy.

Hi Asfad,

Thanks for reaching out! This doc explains how Octopack decides which version should be assigned to your package, and how to override it with whatever you want:

What you want to do is use the first option and use the MSBuild parameter /p:OctoPackPackageVersion=[build variable] to define the package version. It’ll be up to you to figure out which build variable you want to use along with that parameter.

Best regards,

Hello Dalmiro,
Below is the argument I had passed in, can you please define the parameter for package version so that i will copy and paste the same.

/p:RunOctoPack=true /p:OctoPackPublishPackageToHttp= /p:OctoPackPublishApiKey=API-M7B6OMDYTYTQEDISFSCO1LYDDDA /p:OctoPackProjectName=ETHOS


As mentioned before. the parameter you’ll need to pass is /p:OctoPackPackageVersion=[variable] . The tricky part is figuring out which variable you want to pass to that parameter. From memory (TFS2013 is pretty old by now) the variable that held the build ID was $(TF_Build_buildNumber). Then you were supposed to define the format of that variable in your build definition like this. Keep in mind that whatever you pass to /p:OctoPackPackageVersion needs to be semver compliant

If the build definition setup goes will, In the end you should end up using /p:OctoPackPackageVersion=$(TFS_Build_BuildNumber)

I used this page I found online to refresh my memory about this old TFS version. It shows a bit how to modify this system variable and make it hold the value you want:

Sorry if you were looking for a simple Copy/Paste reply and I ended up giving you more homework :(.

Best regards,

I noticed from your email signature that you are part of Accenture. I know from experience that your company has a pretty good devops team in charge of maintaining your TFS and Octopus Servers. I’m pretty sure that if you contact them, they’ll have more info about tweaking this xaml-based build definitions in order to get a variable with the value you want. I know at least Ian Paullin and Thadd Parker are part of that team and will be able to put you in contact with someone that can help you.