eliHeist
eliHeist

Reputation: 111

Visual studio 2019 giving error when I try to install nuget package file offline

I have setup a folder on my pc for local nuget packages that I have downloaded

When I click install in package manage without internet connection I get this error

Unable to load the service index for source https://api.nuget.org/v3/index.json.
An error occurred while sending the request. 
The remote name could not be resolved: 'api.nuget.org'

What should I do to solve this?

Upvotes: 1

Views: 1410

Answers (2)

Mr Qian
Mr Qian

Reputation: 23740

Under Tools-->Options-->Nuget Package Manager-->Package Sources

uncheck nuget.org package source.

enter image description here

Since you have aligned the network connection and checked nuget.rog, VS will visit all checked package sources.

Upvotes: 1

Simmetric
Simmetric

Reputation: 1651

Go to Tools -> NuGet Package Manager -> Package Manager Settings, and remove the package source pointing to NuGet.org You still have this source in your package source list and NuGet is going to try and connect to it.

Upvotes: 0

Related Questions