首页 > 解决方案 > 如何使用 YAML 从 Artifactory 恢复包

问题描述

这里的指南给出了下面的示例代码:

- task: DotNetCoreCLI@2
  inputs:
    command: restore
    projects: '**/*.csproj'
    feedsToUse: config
    nugetConfigPath: NuGet.config    # Relative to root of the repository
    externalFeedCredentials: <Name of the NuGet service connection>

但我很难知道需要什么来代替<Name of the NuGet service connection>甚至NuGet.config.

Artifactory指南没有使用 YAML,甚至没有提到它,所以我不知道它是否可能。

我的问题:以上是否可能,如果可以,我应该在上面的脚本中包含什么?

标签: azure-devopsartifactory

解决方案


<Name of the NuGet service connection>正是它所说的。在您的项目中创建一个指向 NuGet 提要的服务连接,然后在那里按名称引用它。


推荐阅读