`nuget restore`:NuGet解决了软件包依赖关系的错误版本

时间:2020-03-25 14:17:26

标签: windows nuget

我有两台机器,我的开发机器和构建服务器。对于后者,enumerate(list(zip(axes.ravel(), forest.estimators_))) 确实尝试为特定软件包提取错误的版本

nuget restore

我已经检查了完整的解决方案,没有版本16:15:48 Failed to retrieve information about 'Autofac' from remote source 'https://nuget.intra/api/nuget/virtual-nuget/FindPackagesById()?id='Autofac'&semVerLevel=2.0.0'. ,只有2.0.0。更奇怪的是,4.x.x在我的开发机器上工作正常

nuget restore

两者都与D:\development\data\svn\MYPROJECT λ nuget restore MSBuild auto-detection: using msbuild version '4.8.3761.0 built by: NET48REL1' from 'C:\Windows\Microsoft.NET\Framework\v4.0.30319'. Restoring NuGet package Autofac.4.9.4. ... GET https://nuget.intra/api/nuget/virtual-nuget/Packages(Id='Autofac',Version='4.9.4') ... OK https://nuget.intra/api/nuget/virtual-nuget/Packages(Id='Autofac',Version='4.9.4') 31ms ... GET https://artifactory.intra/artifactory/api/nuget/virtual-nuget/Download/Autofac/4.9.4 ... OK https://artifactory.intra/artifactory/api/nuget/virtual-nuget/Download/Autofac/4.9.4 95ms ... Installing Autofac 4.9.4. ... Adding package 'Autofac.4.9.4' to folder 'D:\development\data\svn\MYPROJECT\packages' ... Added package 'Autofac.4.9.4' to folder 'D:\development\data\svn\MYPROJECT\packages' .... Restoring NuGet package Autofac.4.9.0. GET https://nuget.intra/api/nuget/virtual-nuget/Packages(Id='Autofac',Version='4.9.0') Adding package 'MSTest.TestFramework.1.3.2' to folder 'D:\development\data\svn\MYPROJECT\packages' OK https://nuget.intra/api/nuget/virtual-nuget/Packages(Id='Autofac',Version='4.9.0') 37ms GET https://artifactory.intra/artifactory/api/nuget/virtual-nuget/Download/Autofac/4.9.0 OK https://artifactory.intra/artifactory/api/nuget/virtual-nuget/Download/Autofac/4.9.0 10ms Installing Autofac 4.9.0. ... Adding package 'Autofac.4.9.0' to folder 'D:\development\data\svn\MYPROJECT\packages' GET https://artifactory.intra/artifactory/api/nuget/virtual-nuget/Download/System.Security.Cryptography.Algorithms/4.3.0 ... Added package 'Autofac.4.9.0' to folder 'D:\development\data\svn\MYPROJECT\packages' ... NuGet Config files used: C:\Users\papanito\AppData\Roaming\NuGet\NuGet.Config C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config Feeds used: https://nuget.intra/api/nuget/virtual-nuget C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\ Installed: 18 package(s) to packages.config projects 安装了相同的nuget版本。我还将相同的choco install nuget.commandline分发到两台计算机上。

更新

进一步在日志中,我可以看到以下内容

Nuget.Config

也许由于无法读取索引而下载了错误的版本?但是,仍然无法解释为什么在我的开发机上一切正常。

更新2

因此,在生成服务器上安装了Visual Studio 2017。我检查了其他各种来源并尝试了一些方法,但均未成功。

检查了各种文件的代理设置,但其中没有一个很好,

  • Unable to load the service index for source https://nuget.intra/api/nuget/virtual-nuget. 07:43:45 Invalid length for a Base-64 char array or string.
  • C:\Windows\syste - m32\config\systemprofile\AppData\Roaming\NuGet\NuGet.Config

2 个答案:

答案 0 :(得分:0)

通过错误代码,从构建服务器获取该NuGet软件包似乎是一个问题。

如果运行Fiddler(并将其配置为decrypt HTTPS),那么从私有NuGet服务器检索索引文件时,您将得到什么状态代码?

从nuget.org检索Autofac NuGet软件包时,低于200 OK:

enter image description here

答案 1 :(得分:0)

我似乎认为问题与错误的NuGetDefaults.config有关:只要在该文件中为源定义了usernamepassword,nuget就会失败。