4

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.

d.i.joe
  • 606
  • 9
  • 22
  • Typically when this happens, you need to update your version of Nuget. You can do this through the Visual Studio Extensions. You may also want to see more information at either of these links: https://github.com/NuGet/Home/issues/5358 and https://stackoverflow.com/questions/6723574/install-package-the-remote-name-could-not-be-resolved-packages-nuget-org?rq=1 – JasCav Jul 25 '17 at 12:41

1 Answers1

4

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.

d.i.joe
  • 606
  • 9
  • 22