The error "'nuget' is not recognized as an internal or external command, operable program or batch file" occurs for two main reasons:
nugetinstalled on your machine.
nugetin your system's PATH environment variable.
'nuget' is not recognized as an internal or external command, operable program or batch file The term 'nuget' is not recognized as the name of a cmdlet, function, script file, or operable program
To resolve the error on Windows:
nuget.exe file isn't executable, so don't run it. Instead, open the
directory where you downloaded the file.
Right-click on the
nuget.exe file and click on "Properties".
nuget.exe. Note that we need the location of the directory where
nuget.exeis located, not the location of the
Now you have to add the path you just copied to your
Click "OK" twice to confirm.
Close your Command prompt application and then reopen it.
You might also have to restart your PC, but that's not always necessary.
Open a new CMD shell and run the
nuget command to verify
nuget is installed
and configured properly.
You can resolve the "command not found: nuget" error by following the instructions in this section of the docs.
Install Mono for your operating system.
Run the following command in your terminal.
sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
nugetcommand by adding the following line to your configuration file (e.g.
# create an alias for nuget alias nuget="mono /usr/local/bin/nuget.exe"
nugetcommand to verify
nugetis installed and configured properly.
If you get the "command not found: mono" error, you have to
install Mono for
your operating system as it is a prerequisite for
You can learn more about the related topics by checking out the following tutorials: