我在内部网络的 Nexus(v 3.9.0-01)上有一个 nuget 代理。我自己还没有填充本地 Nexus 存储库(并且不知道它是如何完成的或是否出现任何问题),但是,我可以手动上传新包。构建在 Bamboo 代理上进行,无法连接到公共存储库。
因为隔离,我必须跑步dotnet build
/ dotnet publish
with --no-restore
并使用恢复包dotnet restore $projectPath --source $localNexus --runtime win-x64
包裹正在恢复正常,直到NuGet.Frameworks.4.7.0
。该软件包有 5 个不同的版本(据我所知,官方 nuget 存储库的确切副本 https://www.nuget.org/packages/NuGet.Frameworks/),只是不是普通的 4.7.0(官方仓库中也不存在)。然后,dotnet restore
产生以下输出:
build 20-Jun-2018 16:24:26 info : GET https://nexus.***.***.***.au/repository/nuget.org-proxy/Microsoft.CodeAnalysis.Workspaces.Common/2.8.0
build 20-Jun-2018 16:24:27 error: The feed 'https://nexus.***.***.***.au/repository/nuget.org-proxy/ [https://nexus.***.***.***.au/repository/nuget.org-proxy/]' lists package 'NuGet.Frameworks.4.7.0' but multiple attempts to download the nupkg have failed. The feed is either invalid or required packages were removed while the current operation was in progress. Verify the package exists on the feed and try again.
build 20-Jun-2018 16:24:27 error: Unable to find package 'NuGet.Frameworks.4.7.0'.
即使我强制使用包,恢复操作也会失败dotnet add $projectPath
包 --source $localNexusbefore running
点网恢复`。
注意:这个包是一个依赖项Microsoft.VisualStudio.Web.CodeGeneration.Design
在我的项目中。
可能相关:https://issues.sonatype.org/browse/NEXUS-6159 https://issues.sonatype.org/browse/NEXUS-6159(标有不同的 Nexus 版本)
问题:
- 为什么包恢复失败(即没有提取最合适的 4.7.0-xxx)?
- 是因为 Nexus 的一些怪癖吗?或者损坏的包?
- 为什么使用手动添加有问题的包没有帮助
dotnet package add
?
Nexus 3.10 也有完全相同的问题,根据这个 Nexus 问题,这个问题似乎在 3.14 中得到了解决;https://issues.sonatype.org/browse/NEXUS-17611 https://issues.sonatype.org/browse/NEXUS-17611
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)