简体   繁体   中英

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. I'm using a little modified NuGet.targets, which executes this script:

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. 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.

I tested the snippet quickly, and it works. Maybe something temporarily from your location?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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