作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
NuGet 还原从同一组织中的另一个项目的提要失败 404。
当使用管道中的 nuget restore
时,找不到不同项目中的提要。
最佳答案
经过长时间的搜索,这些是使其一致工作所必需的步骤:
设置权限
nuget.config file
并确保在 feedsToUse
设置为 'config'
- task: DotNetCoreCLI@2
displayName: DotNetCore-Restore
inputs:
command: 'restore'
projects: '$(PathToSolution)'
feedsToUse: 'config'
nugetConfigPath: '$(PathToNugetConfig)/nuget.config'
includeNuGetOrg: true
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="feed_name" value="feed_url" />
</packageSources>
</configuration>
Most dotnet commands, including build, publish, and test include an implicit restore step. This will fail against authenticated feeds, even if you ran a successful dotnet restore in an earlier step, because the earlier step will have cleaned up the credentials it used.
- Source (.NET Core CLI task docs)
关于.net-core - Nuget 还原不适用于 Azure Devops 中的工件源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61384798/
我是一名优秀的程序员,十分优秀!