Recently, the project needed to add a dependency to NuGet, but the company's development machine had no network... Speaking of which, you may not believe it, but the development machine that does development actually has no network!!!! (Then why don't you leave the flash person quickly) There is no way, the project needs to throw things into VS, only find a way to add dependencies If you have a network, adding dependencies in NuGet is very simple, just search for it and install it directly. Back to the point, let's talk about the problem of installing package dependencies in NuGet offline.
First of all.
https://www.nuget.org/ This is the official website of NuGet, click in, and then search for the installation package you need in the search box, I need to install Geckofx, so search for this (for example).
Then, open VS, select Toolbar - Nuget Package Manager - General - Browse
We click browse, and then the explorer will open the cache directory of nuget, my cache directory is: C:\Users\itsvse\AppData\Local\NuGet\Cache
We cut the downloaded nupkg package to the C:\Users\itsvse\AppData\Local\NuGet\Cache directory.
Finally, run the following command in the nuget console:
Or:
|