2

On .Net core web applications when I want to manage my NuGet Packages or add a reference to my project's references, I do right click on references and select "Manage NuGet Package" and now I can add package(s) and if I select install, visual studio downloads selected package and install it on my project.It works fine.

But I want to know how can I use that downloaded NuGet package again on another project?

Should I use package manager and download it again or I can use downloaded files as offline installation?

I have installed packages files on this path on my computer:

C:\Users\Administrator\.nuget\packages
Moerwald
  • 10,448
  • 9
  • 43
  • 83
motevalizadeh
  • 5,244
  • 14
  • 61
  • 108
  • 1
    You should download and install it again. It will help you to keep always the newest version in all project and easy way to update it. – Sousuke Aug 22 '16 at 12:55
  • 2
    Possible duplicate of [Manage nuget locally in project.json .Net Core](http://stackoverflow.com/questions/38759865/manage-nuget-locally-in-project-json-net-core) – Set Aug 22 '16 at 13:22
  • See https://stackoverflow.com/questions/43400069/dotnet-add-package-with-local-package-file – Marlon Dias Mar 15 '18 at 20:03

1 Answers1

3

I had the same issue and I couldn't find any existing solution, so I had to create NuSave.

You give it the name of the package, it will download it with all its dependencies into a local directory of your choice.

Then you can follow this or this to see how you can setup NuGet.Server, a lightweight server that will serve the NuGet packages that you downloaded using NuSave. You will then have a localhost URL that you can add to your Visual Studio NuGet sources for offline access.

Elias
  • 449
  • 4
  • 9