AzureDevOps/VSTS Build - Could not find version number data in BUILD_BUILDNUMBER

Luke Puplett picture Luke Puplett · Apr 14, 2016 · Viewed 13.1k times · Source

Setting up a simple class library to build and publish to VSTS's own feed, I see this error when the NuGet package runs.

Could not find version number data in BUILD_BUILDNUMBER

I have the "Use Build number to version package" option ticked. Expected VSTS to just work.

Answer

Frank V picture Frank V · Dec 7, 2016

The tip for "Use Build number to version package" states:

Will use the build number to version you package. Under General set the build format to be '$(BuildDefinitionName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)'

Following this did get me past this issue (and on to a new one).

Default value:

[Default value]

Correct Value:

[Correct Value]