This happens when either you are not in the directory where the nuget.exe is located or your environment variables are not set for it.
- Make sure you have downloaded NuGet.exe.
- Navigate to it and right click, then click on properties.
- Copy the location of it.
- Navigate to Control Panel > System > Advanced System Settings > Environment Variables.
Windows 10
-
Double click the variable Path click add new, paste in the location of the nuget.exe.
-
Restart Command Prompt and the issue should be fixed.
Other operating Systems
-
Double click the variable Path, If there is no other locations simply paste it in. If there is add a semi colon to the end of it and the paste it in.
-
Restart Command Prompt and the issue should be fixed.