I am trying to create a nuget package using http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package#From_a_convention_based_working_directory as a ref
In Visual Studio:
Tools -> Nuget Package Manager -> Package Manager Console.
In PM:
Install-Package NuGet.CommandLine
Close Visual Studio and open it again.
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
I got around this by finding the nuget.exe and moving to an easy to type path (c:\nuget\nuget) and then calling the nuget with this path. This seems to solve the problem. c:\nuget\nuget at the package manager console works as expected. I tried to find the path that the console was using and changing the environment path but was never able to get it to work in that way.
The nuget commandline tool does not come with the vsix file, it's a separate download
https://github.com/nuget/home
Retrieve nuget.exe
from https://www.nuget.org/downloads
. Copy it to a local folder and add that folder to the PATH
environment variable.
This is will make nuget available globally, from any project.
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.