Geo*_* H. 5 azure nuget azure-devops azure-pipelines
在我的 Azure DevOps 组织中,我有 2 个项目: 项目 1:一些工具 项目 2:我的应用程序
项目 1 的构建结果发布到项目 1 中的 feed。在 VS2019 中,我可以在项目 2 的应用程序中使用该 feed 中的 nuget 包。当我尝试为项目 2 设置管道时,我无法从项目1.
我的管道看起来像:
steps:
- task: NuGetAuthenticate@0
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
feedsToUse: 'select'
vstsFeed: ***FEED_ID***
- task: VSBuild@1
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
Run Code Online (Sandbox Code Playgroud)
nuget 恢复失败并出现以下错误:
##[error]The nuget command failed with exit code(1) and error(Unable to load the service index for source https://***organization***.pkgs.visualstudio.com/***FEED_ID***/_packaging/***PACKAGE_ID***/nuget/v3/index.json.
Response status code does not indicate success: 404 (Not Found - VS800075: The project with id 'vstfs:///Classification/TeamProject/FEED_ID' does not exist, or you do not have permission to access it. (DevOps Activity ID: ...)).
Run Code Online (Sandbox Code Playgroud)
我是否缺少任何配置?
Azure DevOps:无法从 Azure Pipeline 中的源加载 nuget 包
项目范围提要存在已知问题。Microsoft 最近将新源的默认范围级别更改为“项目”而不是“组织”。
因此,您需要检查您的 Feed 是项目范围 Feed 还是组织范围 Feed。如果是组织范围的 feed,则需要检查 azure devops 登录帐户是否有权访问该 feed。
如果提要是项目范围提要,您可以尝试使用vstsFeed:<yourProjectName>/<yourFeedName>或添加项目级构建身份作为读者或贡献者。
检查这个类似的线程以获取更多详细信息。
希望这可以帮助。
| 归档时间: |
|
| 查看次数: |
5646 次 |
| 最近记录: |