首页 > 解决方案 > 还原包时使用了不正确的 nuget 提要

问题描述

由于 babelfor,我们的解决方案中有一个自定义提要来引用我们的提要。

它已经工作了一段时间,但最近,我不得不添加一个新代理,显然,这项工作似乎失败了:

##[error]The nuget command failed with exit code(1) and error(Errors in packages.config projects
    Unable to find version '9.4.0' of package 'Babel.Obfuscator'.
      https://api.nuget.org/v3/index.json: Package 'Babel.Obfuscator.9.4.0' is not found on source '
##[error]Packages failed to restore

由于某些原因,它现在似乎不使用自定义 nuget 存储库。

以下是在我们的 yml 作业描述中配置任务的方式:

- task: NuGetCommand@2
  inputs:
    command: 'restore'
    restoreSolution: '$(solution)'
    feedsToUse: 'select'
    vstsFeed: Babel3
    includeNuGetOrg: true

Babel3 是 Azure Devop 上存储库的名称: 在此处输入图像描述

如您所见,它是正确的版本(9.4.0)。

在我们的解决方案中,我们只有一个包源,也叫 Babel3:

在此处输入图像描述

知道发生了什么吗?

标签: azureazure-devopsnuget

解决方案


推荐阅读