Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. But it is not completing for last 7days due to some unknown network issues. I have tried with clearing the nuget cache, running nuget restore, dotnet restore and build solution. All came with same output.

The nuget package restore starts successfully, it downloads many packages, and then it fails with some random package. 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'.
  • 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

The nuget restore is working successfully for other devs. If it weren't, I could have concluded that it is an issue with the proget server. But now, I cannot decide whether it is an issue with my Visual studio 19, nuget config or system network. The url https://proget.xxx.net/ is opening successfully in my browser.

Any troubleshooting tips/logs to dig deep into the issue, or fixes are welcome.

like image 938
Subhankar Mukherjee Avatar asked Dec 09 '25 07:12

Subhankar Mukherjee


2 Answers

The issue might be with your nuget package source configuration.

Check NuGet Package Sources:

  • Open Visual Studio.
  • Go to Tools > Options.
  • Navigate to NuGet Package Manager > Package Sources.
  • Ensure that the official NuGet source (https://api.nuget.org/v3/index.json) is listed and enabled. If not, add it.

enter image description here

like image 94
FFFffff Avatar answered Dec 12 '25 09:12

FFFffff


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. If someone has a better answer, please share.

like image 31
Subhankar Mukherjee Avatar answered Dec 12 '25 07:12

Subhankar Mukherjee



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!