how to get all nuget dependencies for offline installation

nuget, nuget-package, nuget-server

Solution

On the computer with internet access the NuGet packages (.nupkg) should be in the local machine cache. On Windows this is in the directory similar to:

C:\Users\YourUsername\.nuget\packages

So you should be able to copy the .nupkg files from there to the computer without internet access. I would create a directory on that computer and setup a new package source pointing to that directory. Alternatively you could copy the .nupkg files to the local machine cache, just be aware there is a limit of 200 NuGet packages in the cache. Then you can create a package source pointing to the cache.

Problem

I use two computers, one with internet connection and the other one without. I want to install a Nuget package (Nuget.server) with all its dependencies on the offline computer. Unfortunately it is not possible just to download the package itself and I have to download all dependencies manually and there are dozens of them. How can I create a package on the computer with internet connection that contains all dependencies? Thanks.

Original source