Alex Rivera | Logout

How do I install a NuGet package .nupkg file locally to Visual Studio?

Asked 2012-04-20T03:56:18.397
645

I have some .nupkg files from a C# book that I would like to install to Visual Studio. How can I install them?

Here is what I see in the Add Library Package Reference window showing no packages, with the packages shown in my Options window overlaid on top:

Can't see my packages

Edit
Report

2 Answers

630

Menu Tools → Options → Package Manager

Enter image description here

Give a name and folder location. Click OK. Drop your NuGet package files in that folder.

Go to your Project in Solution Explorer, right click and select "Manage NuGet Packages". Select your new package source.

Enter image description here

Here is the documentation.

answered 2012-04-20T04:13:41.327
386

You can also use the Package Manager Console and invoke the Install-Package cmdlet by specifying the path to the directory that contains the package file in the -Source parameter:

Install-Package SomePackage -Source C:\PathToThePackageDir\
answered 2013-01-30T10:07:10.827

Your Answer