Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The term 'nuget' is not recognized

Trying to run any nuget command from PM Console and I get this error.

nuget : The term 'nuget' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + nuget update -self

What should the path be, when I run this command?

I saw this question and answer => 'nuget' is not recognized but other nuget commands working

and based on the answer, I copied the nuget.exe to the folder and set path. After doing that, I am still getting the same error.

like image 313
user3634685 Avatar asked Jan 31 '17 19:01

user3634685


1 Answers

NuGet command from PM Console is different with NuGet.exe CLI Reference. The command 'nuget' does not supported by the PM Console. Please check whether your NuGet command is correct first. Besides, you can try to use other command from PM Console to verify this issue:

Get-Package -ListAvailable

If all command are not recognized, please check and update your Windows version. In the version 1511, you need to have been updated to .64 or later of the builds...otherwise you run into a powershell bug.

Then update the NuGet VSIX,

Open Visual Studio -> Tools -> Extensions and Update -> Updates,

Update Nuget Package Manager for Visual Studio 2013/2015 (note that: Restart your visual studio after update).

like image 171
Leo Liu-MSFT Avatar answered Sep 20 '22 14:09

Leo Liu-MSFT