While running a batch file, I get the below error: nuget is not a recognized as an internal or external command
It's not working from command prompt. Have a look at the below screenshot.
Click “Advanced System Settings” then click the “Environment Variables” button located within the Advanced tab. From here double-click the PATH variable in the top panel and create a new entry by adding the path to the directory that contains your NuGet.exe file (in this instance it's C:/NuGet/).
How do I check the exact version of the NuGet tools that are installed? In Visual Studio, use the Help > About Microsoft Visual Studio command and look at the version displayed next to NuGet Package Manager.
Switch to the Browse tab, search for the package name, select it, then select Install). For all packages, delete the package folder, then run nuget install . For a single package, delete the package folder and use nuget install <id> to reinstall the same one.
nuget is not a recognized as an internal or external command
That because NuGet is a external command, can not be recognized by Windows in an arbitrary directory, you should type the "NuGet
" or "NuGet.exe
" in the path where NuGet.exe exists and if you want type it in an arbitrary directory, you should download the NuGet.exe (Not VSIX) from NuGet.org and set the local path of NuGet.exe
into your path environment variable.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With