.net core Azure DevOps YAML-.Net核心CLI可以';使用内部伪影馈送的t包

.net core Azure DevOps YAML-.Net核心CLI可以';使用内部伪影馈送的t包,.net-core,azure-devops,yaml,azure-pipelines,asp.net-core-cli,.net Core,Azure Devops,Yaml,Azure Pipelines,Asp.net Core Cli,我正在尝试使用YAML通过.Net Core CLI恢复、构建、打包和推送Azure DevOps Restore知道内部馈送,但pack不知道 如何将内部馈送添加到打包操作 parameters: projects: '' steps: - task: DotNetCoreCLI@2 displayName: "ProvisionRestoreProjects" inputs: command: 'restore' projects: '${{ parameter

我正在尝试使用YAML通过.Net Core CLI恢复、构建、打包和推送Azure DevOps

Restore知道内部馈送,但pack不知道

如何将内部馈送添加到打包操作

parameters:
  projects: ''

steps:
- task: DotNetCoreCLI@2
  displayName: "ProvisionRestoreProjects"
  inputs:
    command: 'restore'
    projects: '${{ parameters.projects }}'
    feedsToUse: 'select'
    vstsFeed: '/4d73414a-a21f-4f84-9355-90beadaf0a6e'

- task: DotNetCoreCLI@2
  displayName: "ProvisionBuildProjects"
  inputs:
    command: 'build'
    projects: ${{ parameters.projects }}
    arguments: '--configuration release  --no-cache'

- task: DotNetCoreCLI@2
  displayName: "ProvisionPackProjects" 
  inputs:
    command: 'pack'
    projects: ${{ parameters.projects }}
    versioningScheme: 'byEnvVar'
    versionEnvVar: 'NugetVersion'
    feedsToUse: 'select'
    vstsFeed: '/4d73414a-a21f-4f84-9355-90beadaf0a6e'

- task: DotNetCoreCLI@2
  displayName: "ProvisionPushProjects"
  inputs:
    command: 'push'
    packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg'
    feedsToUse: 'select'
    vstsFeed: '/4d73414a-a21f-4f84-9355-90beadaf0a6e'

您不需要在
pack
命令中指定提要


pack
命令仅用于将文件打包到
.nupkg
文件(NuGet-package),然后将其推送到提要


有关该命令以及可以使用哪些选项的详细信息,您可以选择。

您不需要在
pack
命令中指定提要


pack
命令仅用于将文件打包到
.nupkg
文件(NuGet-package),然后将其推送到提要


有关该命令以及可以使用哪些选项的详细信息,您可以选择。

使用
pack
命令“”,这就是它再次尝试恢复包的原因

要防止出现这种情况,请将
nobuild:true
添加到任务输入:

- task: @DotNetCoreCLI@2
  displayName: Pack
  inputs:
    command: pack
    nobuild: true

它将不再尝试重建项目本身,而是使用在前面步骤中创建的工件。

使用
pack
命令“”,这就是它再次尝试恢复包的原因

要防止出现这种情况,请将
nobuild:true
添加到任务输入:

- task: @DotNetCoreCLI@2
  displayName: Pack
  inputs:
    command: pack
    nobuild: true
它将不再尝试重建项目本身,而是使用在前面步骤中创建的工件