VS NuGet Offline package (Cache package) Nupkg installation

Source: Internet
Author: User

Recent projects need to add a dependency in NuGet, but the company's development machine is not net ...

Say that you crossing may not believe, do the development of the development machine actually no net .... (then you don't have to leave the flash.)

No way, the project needs to throw things into the VS inside, only to find ways to add the dependencies in

If there is a net, adding the dependencies inside the NuGet is very simple, and the search comes directly on the line.

To the point, it's still a matter of installing NuGet's package dependencies offline.


First of all.

https://www.nuget.org/

This is the NuGet official website, click in, then search in the box to find the installation package you need, I need to install fluentnhibernate, so search this (for example, ha).



Okay, here's the point. Note the download option for the red box on the left and the dependency option on the right, first click the Download option on the left, download it fluentnhibernate, and then click the Red box on the right.






Also note the picture below the red box, first download the file, and then jump into the dependencies, one thing to be aware of this dependency, or the installation will not succeed, cannot find the dependencies.



This time you will find no dependencies, then this package will download three files out.



This is the three files required for this project package.


then, the focus came again.

C:\Users\Alex\AppData\Local\NuGet\Cache

Find this folder (if you do not have this folder you can create a folder according to this folder structure)

Open the tool->nuget Package Manager, Package Manager settings, and locate the local path to the NuGet package cache. The following figure:


Click to browse and you will find the 3 files you just downloaded. See you Again,ha?

And then:

In the project, open the Tools->nuget Package Manager console, and enter the command:install-package fluentnhibernate , to install.

If this thing doesn't work, try this command, take the address.

Install-package Fluentnhibernate-source C:\Users\Alex\AppData\Local\NuGet\Cache\
The compiler interface will appear below this step.
Basically it compiles successfully and adds the dependency package to the project.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.