2

Today I faced the error

Error 1 NuGet Package restore failed for project xxxx: The remote name could not be resolved: 'www.nuget.org'

After investigation I found that nuget.org is having problem with DNS as reported in nuget official twitter page

If you can't resolve http://nuget.org , use 168.62.110.126/api/v2 instead, seems there's some wide DNS issues going on

Now I tried the url 168.62.110.126 to get the nuget.org page in my browser. But even after i made changes to host file in my vm cloud machine under path C:\Windows\System32\drivers\etc\host with line at end

168.62.110.126 http://www.nuget.org

and restarted the browser , closed the visual studio 2013, deleted the suo file. I am not able to browser the nuget.org with https or http either in browser or not able to build the vs solution. always get the same error as given in top. Any clue how to resolve the issue. I gone other similar question but they are not this issue . rather appear their question heading need more work.

1

1 Answer 1

3

When you copied the text from the web page you found that, Chrome added http:// to the URL. This should not be there. Your hosts file should contain:

168.62.110.126 www.nuget.org

And NOT

168.62.110.126 http://www.nuget.org

As an aside, it looks like this issue is in the process of being fixed (www.nuget.org now resolves for me), so you should ensure you don't leave these lines in your hosts file for longer than necessary, or you'll end up wondering why nuget doesn't work in 3 months time when it's no longer running on that IP!

1
  • Thank you Richard..it worked like a charm...now Visual studio is build is working fine as well..
    – AKS
    Apr 30, 2015 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.