Nuget不再能够找到软件包版本

时间:2020-06-24 20:58:04

标签: .net nuget

我的构建服务器在运行nuget restore时突然开始使所有构建失败,并且所有软件包都出错。这些软件包版本存在,并且可以正常工作直到上个星期左右。

NuGet Version: 5.6.0.6591
MSBuild auto-detection: using msbuild version '16.6.0.22303' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
MSBuild P2P timeout [ms]: 120000
<long MSBuild output>

Restoring NuGet package NLog.4.6.2.
Restoring NuGet package FluentAssertions.3.0.107.
Restoring NuGet package Mindscape.Raygun4Net.5.0.0.
WARNING: Unable to find version '3.0.107' of package 'FluentAssertions'.
WARNING: Unable to find version '4.6.2' of package 'NLog'.
WARNING: Unable to find version '5.0.0' of package 'Mindscape.Raygun4Net'.
WARNING: Unable to find version '4.6.2' of package 'NLog'.
WARNING: Unable to find version '3.0.107' of package 'FluentAssertions'.
WARNING: Unable to find version '5.0.0' of package 'Mindscape.Raygun4Net'.

NuGet Config files used:
    C:\TeamCity\buildAgent\work\5179f1a1ebd4ddaa\src\.nuget\NuGet.Config
    C:\Users\<my name>\AppData\Roaming\NuGet\NuGet.Config

enter image description here

我在Nuget博客上找到了有关删除对TLS 1.0和1.1的支持的文章,因此我将服务器更新为仅使用TLS 1.2。这没有解决问题。我不确定如何进一步诊断nuget为什么找不到软件包版本。

1 个答案:

答案 0 :(得分:0)

有类似的问题,在构建正常之前(3周前),分支代码完全没有更改,昨天又触发了一次,但失败了。在我的情况下,将NuGet更新到最新版本是有帮助的,以前是3.3.0.212,现在是5.6.0.6591,并且可以正常工作,也许尝试安装其他nuget版本(例如,检查较旧的版本)。除了nuget.exe更新到最新版本以外,没有其他更改。

Old nuget version errors