24

Is there a way to install Nuget Packages globally?

I have a Nuget Package that I would like to use across multiple projects without having to download for each project?

Each project will have its own solution and it will be independent of other project.

Ishan
  • 2,935
  • 11
  • 30
  • 50
  • 1
    I'm also looking for an answer to this question. [This blog post](http://blog.nuget.org/20141010/nuget-is-broken.html) by the NuGet dev lead from october 2014 lists "Global Package Installation" as one of the open issues. Don't know if it's fixed by now though. – Andreas Jul 07 '16 at 12:03
  • I wish there were a way. I experiment a lot and create new solutions every day and have had to re-download everything every time so far. Even in case there is no official way there is to be a tool capable of copying NuGet packages from one solution into another and/or maintaining a cache of them. – Ivan Feb 25 '17 at 01:35
  • If the package is a tool, use `dotnet tool install -g `. For more information, see https://natemcmaster.com/blog/2018/05/12/dotnet-global-tools/. – fernacolo Jan 28 '19 at 00:35

2 Answers2

4

NuGet in its current version uses a global package cache.

Have a look at the documentation to find out where it is on your machine. You should also poke around the NuGet configuration file documentation for how to update the global cache location.

0

Apparently this has been possible for some time... the question has been asked here on SO a couple of years ago. See:

Setting up a common nuget packages folder for all solutions when some projects are included in multiple solutions

Community
  • 1
  • 1
Matt
  • 6,353
  • 8
  • 52
  • 100
  • 2
    I looked at that post before asking the question here on SO. My question is different. See my updated question. – Ishan Nov 15 '15 at 03:04