Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Azure by (5.8k points)

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.

1 Answer

0 votes
by (9.6k points)

You can set your build format like this: 

Write-Verbose "Autoversion: Getting version number from build"

##Get Version from Build

# Regular expression pattern to find the version in the build number 

# and then apply it to the assemblies

$VersionRegex = "\d+\.\d+\.\d+(?:\.\d+)?"

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...