在.net Rider IDE中恢复解决方案的nuget软件包:无法下载软件包`x`到GET`x`的HTTP请求在100000ms后超时

Mah*_*oud 5 c# nuget .net-core rider

我有ArchLinux发行版,我测试.Net SDKLinux的第一次。我安装了的试用版JetBrains Rider IDE。我创建了新ASP.Net Core项目,但是Event Log在构建解决方案或手动还原解决方案的Nuget软件包时,我在窗口中收到此错误消息:

下午1:51无法在集成项目中还原NuGet程序包无法从远程源' https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.webutilities/index检索有关'Microsoft.AspNetCore.WebUtilities'的信息.json '。设置日志包文件夹

下午1:51 PM还原失败无法从远程源' https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.webutilities/index.json ' 检索有关'Microsoft.AspNetCore.WebUtilities'的信息。设置日志包文件夹

这是Log窗口内容,因为它是非常大的内容,所以我将其上传到了Google Drive:这里

有人遇到过这个问题吗?另外,为什么骑手试图获取地球上所有的Nu​​get包裹?我没有引用Microsoft.Win32.Registry,这些错误行之一抱怨:

修订:无法下载软件包“ Microsoft.Win32.Registry.4.4.0”

编辑1

之后,尝试dotnet restore获取以下输出:

$ dotnet restore

Permission denied to modify the '/opt/dotnet/sdk/NuGetFallbackFolder' folder.

Here are some options to fix this error:
---------------------
1. Re-run this command with elevated access.
2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true.
3. Copy the .NET Core SDK to a non-protected location and use it from there.

  Restoring packages for /home/m/Prog Projects Mid 2018/CSharp/testingRider/WebApplication1/WebApplication1/WebApplication1.csproj...
  Failed to download package 'Microsoft.Win32.Registry.4.4.0' from 'https://api.nuget.org/v3-flatcontainer/microsoft.win32.registry/4.4.0/microsoft.win32.registry.4.4.0.nupkg'.
  The download of 'https://api.nuget.org/v3-flatcontainer/microsoft.win32.registry/4.4.0/microsoft.win32.registry.4.4.0.nupkg' timed out because no data was received for 60000ms.
    Exception of type 'System.TimeoutException' was thrown.
  Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.webutilities/index.json'.
  An error occurred while sending the request.
    SSL connect error
  Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.mvc.viewfeatures/index.json'.
  An error occurred while sending the request.
Run Code Online (Sandbox Code Playgroud)

输出也很长,大部分将retrying要下载软件包。

Zde*_*nek 6

根据所附的 Rider 和dotnet日志,此问题与 Rider IDE 无关。

似乎有一些首次体验功能dotnet需要访问dotnet/sdk/NuGetFallbackFolder,但未提供访问权限,因此您会在日志中收到错误,但这可能不是真正的根本情况。

根据日志消息,问题出在您的计算机和 NuGet 服务器之间的网络中 The download of 'https://api.nuget.org/v3-flatcontainer/microsoft.win32.registry/4.4.0/microsoft.win32.registry.4.4.0.nupkg' timed out because no data was received for 60000ms.

您可能应该检查您的网络和 dotnet/NuGet 设置。

  • 问题是我的互联网连接不是很稳定,可以说是随机稳定的。有时一个包在 500-700 毫秒的时间范围内被下载,有时更多。真正的问题是`dotnet` 使用`parallel` 来加速包下载,因此多个包同时下载,解决方案只是禁用并行`dotnet restore --disable-parallel` 所以只下载一个文件同时,没有文件需要超过 10 秒的限制,现在一切正常。 (4认同)