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

后端 未结 4 2069
[愿得一人]
[愿得一人] 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:11

    If what you want is the major.minor.patch.unique-to-build then you use the Use the date and time option.

    In yaml, the equivalent is

    - task: NuGetCommand@2
      displayName: Pack
      inputs:
        command: 'pack'
        packagesToPack: '**/*.csproj'
        versioningScheme: 'byPrereleaseNumber'
        majorVersion: '1'
        minorVersion: '0'
        patchVersion: '0'
    

提交回复
热议问题