← all posts

Turning "on" local cache for NuGet

Gordon Beeming
Gordon Beeming

My internet connection is slow or down quite a lot. One of the things Robert MacLean pointed out today in a presentation at a Microsoft Dev Day event today is that is that you can make use of the local cache from previous downloaded packages. Below is how to do this 🙂

You can simple hit ctrl + Q type NuGet and then choose Package Manager Settings.

Visual Studio Quick Launch for NuGet Package Manager Settings
Accessing NuGet Package Manager Settings via Quick Launch

When the window opens click Browse.

NuGet Package Manager Settings window with Browse button
NuGet Package Manager Settings - General tab with Browse button

This will open a Windows Explorer window with a path like below

Windows Explorer showing NuGet cache path
Windows Explorer open at the NuGet local cache path

Copy that path into your clipboard and go back to the Package Manager Settings window. Click on the Package Sources tab and then click on the new button

NuGet Package Manager Settings - Package Sources tab
NuGet Package Manager Settings - Package Sources tab with Add button

Give this new package source a name and paste the path into the Source textbox

Adding NuGet local cache as a package source
Configuring the local NuGet cache as a new package source

Click OK and you sorted. Your pc will now use your local cache for packages as well 🙂

Gordon Beeming
Gordon Beeming

Father • Husband • Triathlete • SSW Solution Architect

Related posts