简体   繁体   English

nuget.exe是否移动或无法访问(500内部服务器错误)?

[英]Is nuget.exe moved or inaccessible (500 Internal Server Error)?

I've got a number of projects, configured to download NuGet.exe and restore NuGet packages, when required. 我有许多项目,配置为在需要时下载NuGet.exe并还原NuGet软件包。 I'm using a little modified NuGet.targets, which executes this script: 我正在使用经过修改的NuGet.targets,它执行以下脚本:

Log.LogMessage("Downloading latest version of NuGet.exe...");
WebClient webClient = new WebClient();
webClient.DownloadFile("https://nuget.org/nuget.exe", OutputFilename);

Everything was working well. 一切都很好。 At least during this week this code raises exception, which returns 500 Internal Server Error, and NuGet.exe can't be downloaded. 至少在本周内,此代码引发异常,该异常返回500 Internal Server Error,并且无法下载NuGet.exe。 At the same time, packages downloading works. 同时,包下载有效。

What's happening? 发生了什么? What am I doing wrong? 我究竟做错了什么?

Works for me from the browser. 从浏览器为我工作。 I receive a 302 to a cdn, and the file is delivered. 我收到到CDN的302,并且文件已交付。

I tested the snippet quickly, and it works. 我快速测试了该代码段,它可以正常工作。 Maybe something temporarily from your location? 也许是暂时不在您所在地的东西?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM