今天用Nuget下一個程序包時,發現Nuget掛了: 未能解析此遠程名稱:'nuget.org' 。
瀏覽器打開 http://nuget.org 失敗。
使用cmd命令 輸入nslookup nuget.org 解析失敗
使用Google的DNS 輸入 nslookup nuget.org 8.8.8.8 解析成功
如:
服務器: google-public-dns-a.google.com
Address: 8.8.8.8
非權威應答:
名稱: nuget.org
Address: 157.56.8.189
這時將解析出來的IP地址 和nuget.org寫入到 %system%/system32/drivers/etc中的hosts文件中
格式: IP地址 域名
157.56.8.189 nuget.org
注:一定要寫入自己電腦上解析出來的IP地址。
本人一開始寫入的是 從網上copy來的Ip地址,結果依然解析失敗,不知道是IP地址失效還是過期了