How to help yourself when NuGet goes down

1 minute read

Today will be remembered as the day that NuGet.org went down and broke quite some builds. While many people would love to see the NuGet team wearing a pink sombrero, there is something to say about wearing it yourself if you did not manage to work around this. Let me explain…

First of all, just as with the Azure downtime on a leap day, whenever you rely on an external system and make it mission critical, you should design for failure. You need to anticipate downtime. I'm sure the NuGet team does everything within its power to fix this and is going to inform us whenever they can, but give them some credit please: we're all human beings making mistakes, that's how we learn.

pinksombrero

How do I know it's not just me?

Here's what you can do

The best thing one can and should do, again, is to anticipate. Have a backup repository, or mirror packages on a MyGet.org feed. Looking at my twitter streams, it is striking to see how many did not think about it.

If you have your packages in source control, impact is limited to not being able to upgrade your packages or install new packages. If you don't have your packages in your VCS, and you did not anticipate, you might get lucky enough and fix your builds by targeting the local NuGet cache.

Simply register the following path as a NuGet package source and target this one:

%Localappdata%\NuGet\Cache

Or you could simply upload your packages from cache to a MyGet feed as well and register this feed as a safe haven to fallback upon.

Avoid spending your day fingers crossed!

Leave a Comment