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

后端 未结 4 2071
[愿得一人]
[愿得一人] 2021-02-01 15:45

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 da

4条回答
  •  太阳男子
    2021-02-01 16:05

    This is because your build number does not match the regex in "Nuget Packager" step. Following is the regex that nuget packager task used to find the build number. You can set your build number format base on this. General, the format like 1.2.3 or 1.2.3.4 would work.

    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+)?"
    

提交回复
热议问题