The remote name could not be resolved: 'api.nuget.org'

Viewed 4078

I am having problem installing a Nuget package using the Package Manager Console in Visual Studio 2017. The following if the full details of the error:

install-package : 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'
At line:1 char:1
+ install-package selenium.webdriver -version 3.0.0
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

I already checked the status of each Nuget servers here and all seem operational. I also found similar posts but most them are old enough. I even tried to reset my router but still the same.

Hope someone helps me. I already emailed their support but did not get a reply yet.

1 Answers

I encountered this issue some time ago but I still want to post the reason to help others. It seems the error details were correct:

The remote name could not be resolved: 'api.nuget.org'

I just found out the next day that my internet provider was having issues at that time. I tried installing the package again that day and it works without doing any adjustments.

Related