简体   繁体   English

无法在 VS 2019 中下载 nuget 软件包

[英]nuget packages failing to download in VS 2019

I am trying to restore packages for my .Net core solution from private proget server maintained by my organization using vpn.我正在尝试从我的组织使用 vpn 维护的私有 proget 服务器恢复我的 .Net 核心解决方案的包。 But it is not completing for last 7days due to some unknown network issues.但由于一些未知的网络问题,它在过去 7 天内没有完成。 I have tried with clearing the nuget cache, running nuget restore , dotnet restore and build solution.我尝试清除 nuget 缓存,运行nuget restoredotnet restore和构建解决方案。 All came with same output.都带有相同的输出。

The nuget package restore starts successfully, it downloads many packages, and then it fails with some random package. nuget 包恢复成功启动,它下载了许多包,然后它失败了一些随机包。 Some of the error logs that I have received are:我收到的一些错误日志是:

  • Retrying 'FindPackagesByIdAsyncCore' for source 'https://proget.xxx.net/nuget/TestFeed/FindPackagesById()?id='packageName'&semVerLevel=2.0.0'.为源“https://proget.xxx.net/nuget/TestFeed/FindPackagesById()?id='packageName'&semVerLevel=2.0.0'重试'FindPackagesByIdAsyncCore'。
  • An error occurred while sending the request.发送请求时发生错误。
  • Unable to connect to the remote server无法连接到远程服务器
  • A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 127.0.0.1:8888连接尝试失败,因为连接方在一段时间后没有正确响应,或者因为连接的主机没有响应而建立连接失败 127.0.0.1:8888

The nuget restore is working successfully for other devs. nuget 恢复对其他开发人员成功运行。 If it weren't, I could have concluded that it is an issue with the proget server.如果不是,我可以得出结论,这是 proget 服务器的问题。 But now, I cannot decide whether it is an issue with my Visual studio 19, nuget config or system network.但是现在,我无法确定这是我的 Visual Studio 19、nuget 配置还是系统网络的问题。 The url https://proget.xxx.net/ is opening successfully in my browser.网址https://proget.xxx.net/在我的浏览器中成功打开。

Any troubleshooting tips/logs to dig deep into the issue, or fixes are welcome.欢迎任何用于深入研究问题的故障排除提示/日志或修复。

It seemed like a network issue, nothing with any setup.这似乎是一个网络问题,没有任何设置。 I tried with dotnet restore to fetch all dependencies during idle hours, and it worked successfully.我尝试使用dotnet restore在空闲时间获取所有依赖项,并且成功运行。 If someone has a better answer, please share.如果有人有更好的答案,请分享。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM