In Visual Studio, use the Help > About Microsoft Visual Studio command and look at the version displayed next to NuGet Package Manager. Alternatively, launch the Package Manager Console (Tools > NuGet Package Manager > Package Manager Console) and enter $host to see information about NuGet including the version.
Click “Advanced System Settings” then click the “Environment Variables” button located within the Advanced tab. From here double-click the PATH variable in the top panel and create a new entry by adding the path to the directory that contains your NuGet.exe file (in this instance it's C:/NuGet/).
Switch to the Browse tab, search for the package name, select it, then select Install). For all packages, delete the package folder, then run nuget install . For a single package, delete the package folder and use nuget install <id> to reinstall the same one.
Nuget.exe is placed at .nuget
folder of your project. It can't be executed directly in Package Manager Console, but is executed by Powershell commands because these commands build custom path for themselves.
My steps to solve are:
C:\Program Files\NuGet\Visual Studio 2012
(or your VS version);C:\Program Files\NuGet\Visual Studio 2012
(or your VS version) in PATH environment variable Update
NuGet can be easily installed in your project using the following command:
Install-Package NuGet.CommandLine
In [Package Manager Console]
try the below
Install-Package NuGet.CommandLine
There are much nicer ways to do it.
Install nuget via chocolatey - much nicer. Install chocolatey: https://chocolatey.org/, then run
cinst Nuget.CommandLine
in your command prompt. This will install nuget and setup environment paths, so nuget is always available.
You can also try setting the system variable path to the location of your nuget exe and restarting VS.
PATH
variable and add the location of your nuget.exe (for me this is: C:\Program Files (x86)\NuGet\Visual Studio 2013
)I would have posted this as a comment to your answer @done_merson but I didn't have the required reputation to do that.
The nuget commandline tool does not come with the vsix file, it's a separate download
https://github.com/nuget/home
In Visual Studio:
Tools -> Nuget Package Manager -> Package Manager Console.
In PM:
Install-Package NuGet.CommandLine
Close Visual Studio and open it again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With