Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install NuGet via PowerShell script

As far as I can tell, NuGet is meant to be installed as a Visual Studio extension:

http://docs.nuget.org/docs/start-here/installing-nuget 

But what if I need NuGet on a machine that doesn't have VS installed?

Specifically, I would like to install NuGet with a PowerShell script.

like image 711
BaltoStar Avatar asked May 20 '13 20:05

BaltoStar


People also ask

How do I install NuGet in PowerShell?

Open PowerShell as administrator. Run the command Install-Module PowerShellGet -Force to install the NuGet package. When asked for confirmation to install the NuGet provider, press the Y key and press Enter .

How do I manually install a NuGet package?

Menu Tools → Options → Package Manager 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.

What is NuGet in PowerShell?

Nuget is the package management tool for the . NET and it is similar to PowerShellGet, MSI packages which support several commands and packages to work with PowerShell.


1 Answers

  1. Run Powershell with Admin rights
  2. Type the below PowerShell security protocol command for TLS12:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 
like image 127
Syam Kallada Avatar answered Sep 24 '22 10:09

Syam Kallada