Mar 222018
 
 March 22, 2018  Posted by at 7:08 am Visual Studio  Add comments

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.

Picture proof :D

Picture proof đŸ˜€

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.

nuget-offline7

And

C:\Program Files (x86)\Microsoft SDKs\NuGetPackages

This one has Microsoft specific packages

nuget-offline6

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

nuget-offline2

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 đŸ™‚

nuget-offline5

nuget-offline4

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

What is 6 + 3 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)