mahesh peddi
mahesh peddi

Reputation: 797

How to install Nuget Package without Visual Studio?

I've been trying to install Nuget Package, as I don't use Visual Studio for some reasons, I need to do it without Visual Studio.

Is there any way?

Please help me out.

Upvotes: 15

Views: 32662

Answers (3)

Tom Gordon
Tom Gordon

Reputation: 1

Or just download the file on nuget.org, rename the nupkg to .zip and voila.

The way the code is supposed to be distributed. Unmanaged and portable.

Upvotes: 0

Sharun
Sharun

Reputation: 21

If you're on windows, you can install using the command:

winget install --source winget --id Microsoft.NuGet

Upvotes: 0

Weiwei
Weiwei

Reputation: 3766

After download the NuGet package, please unzip it to local folder, which will list all content of this package. Then add the dlls in the unzipped folder into your project through Add Reference.

For example, I download EntityFramework package from nuget.org site. It will show as entityframework.6.1.3.nupkg. I unzip this .nupkg file to local folder and there has a lib folder in this unzipped folder. Then I find the EntityFramework.dll and EntityFramework.SqlServer.dll in that folder. I add these dlls as reference into my project.

Another way install packages without Visual Studio is using nuget.exe. Please download it from https://dist.nuget.org/win-x86-commandline/latest/nuget.exe

Then open command prompt windows to run nuget.exe and use the command line to install the packages that you want. The detailed command line for nuget, please refer to:

https://docs.nuget.org/consume/command-line-reference

Upvotes: 9

Related Questions