16

I am using version 1.4 and getting this error:

The remote name could not be resolved: go.microsoft.com 

Here are the URLs for the nuget package:

https://go.microsoft.com/fwlink/?LinkID=206669 

Am i missing something here? It was working fine couple of weeks earlier.

2
  • Does that link work in the browser? Commented Aug 2, 2011 at 8:46
  • @dfowler - Yes.It works in the browser. Commented Aug 3, 2011 at 19:23

8 Answers 8

17

I had to add a new package source using the following location:

http://packages.nuget.org

Click on settings in the package manager to manage the sources.

Sign up to request clarification or add additional context in comments.

Comments

5

D'oh!... In my case, I had no internet connection on the computer. The DNS IP address was missing. So make sure you can access the internet from the computer you're trying to install the NuGet package. This is important to check specially if you're working in a Virtual Machine like I'm right now. :)

It failed with this message:

PM> Install-Package jQuery -Version 1.10.2 Install-Package : The remote name could not be resolved: 'nuget.org' At line:1 char:1 + Install-Package jQuery -Version 1.10.2 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Install-Package], WebException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand 

So the could not be resolved has to do with no internet connection.

1 Comment

"Why my Hyper-V VM using a network adaptor with only internal access can't reach nuget?" Lol
4

ipconfig /flushdns at the command prompt fixed it for me.

Comments

2

Copy the URL (usually 'https://api.nuget.org/v3/index.json') and place it in your browser - sometimes there's an issue with the internet and the NuGet Packet Manager just can't connect to the URL.

Hope it helps for future persons having this issue.

Comments

2

I'm Facing the same issue, While I set up my new system

http://packages.nuget.org

Go to

Tools --> NuGet Package Manager --> Package Manager settings --> Package Sources

Name: nuget.org

Source: https://api.nuget.org/v3/index.json

For Visual Studio 2022

Comments

0

In my case, my virtual machine was able to access the internet via Chrome but not via Internet Explorer. Once I fixed the connection issues in IE (by clicking the 'Fix connection issues' button causing IE to reset the LAN adapter), NuGet was able to access the internet as well.

Comments

0

I just had this problem in a virtual machine and it was perplexing given that the url worked from a browser. Updated the nuget package manager and the problem went away.

Personally, I believe it just didn't recognize the nuget repo version (v3) and gave an incorrect error message.

Comments

0

In my case it was something simple. I wasn't running Visual Studio as administrator. Running it as administrator solved it for me. Seems like a silly issue but just thought I'd share it regardless.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.