When NuGet is down
I just did a session at TechDays Finland and although the session went really well I did have some unexpected issues. One hour before my session NuGet.org went down, and I had just cloned my repository for my session- and my session was pretty much code only.
[caption id=“attachment_35883” align=“aligncenter” width=“695”]Picture proof :D[/caption]
I ended up starting my session by showing how you add your own package source in Visual Studio, and where you can find your local cache from previous downloads.
You will find NuGet packages cached in two places:
C:\Users[user name]\AppData\Local\NuGet\Cache
This cache has all your previously downloaded packages for your user.
And
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages
This one has Microsoft specific packages
In Visual Studio select Tools, Options, search for NuGet. Add a new package source, give the source a name and set the path. You can also set priority order.
By default Visual Studio now does a restore in the background and picks the source based on the priority order. I forgot to change that, and Visual Studio actually crashed on me probably because it was having problems with NuGet.org. but after reading the error logs I can’t say for certain that it had anything to do with the package source returning 500’s.
When you download packages make sure you select the correct package source, be that if you use the GUI or the console :)
Comments
Last modified on 2018-03-22