I am facing a situation where nuget.exe is not being recognized by Powershell in Windows Server 2012. I am pretty sure that the environment variable has been correctly set. Yet I am getting the following 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
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (nuget:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I am getting the same error even if I go to the directory where nuget.exe is present and execute nuget.
Windows CMD is showing nuget is not a recognized command, but it's working fine if I execute nuget inside a directory where nuget.exe is present.
Am I making a mistake in setting up environment variable for nuget? Please help :)
Note: I am new to dotnet tech ecosystem.
C:\Nuget> .\nuget.exe