'nuget' is not recognized but other nuget commands working

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:

  • Download NuGet.exe from https://github.com/NuGet/NuGet.Client/releases (give preference for the latest release);
  • Place NuGet.exe in C:\Program Files\NuGet\Visual Studio 2012 (or your VS version);
  • Add C:\Program Files\NuGet\Visual Studio 2012 (or your VS version) in PATH environment variable (see http://www.itechtalk.com/thread3595.html as a How-to) (instructions here).
  • Close and open Visual Studio.

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