Reputation: 51063
The Nuget Distribution pages states:
NuGet 4.x is included in the Visual Studio 2017 installation. Latest NuGet releases are delivered as part of Visual Studio updates.
Batteries are included!
It seems those batteries are flat. In both Package Manager Console and extenal PS windows, when I type nuget
, I get the error:
The term 'nuget' is not recognized as the name of a cmdlet, function, script file, or operable program.
What do I have to do to fix this? If it's installed with VS 2017, surely that install should add it to the PATH variable?
I don't want to use the VS Command Console, even if it is still with 2017, as I have retired all my usage of that relic to PowerShell consoles.
Upvotes: 1
Views: 683
Reputation: 51063
All I had to do was add the location of nuget.exe
to the PATH
environment variable for my user and all users, The latter is up to you, but I always run VS as Administrator
.
Sages of yore used to always advise against doing this, but MS in all their divine wisdom has made life as a web developer using VS so difficult under a non-admin account, I see nary a mention of said advice, even since around VD 2010 even.
You'd think that with Nuget being installed as part of Visual Studio, the least they could do is add amend that bloody variable as part of the VS installation.
Upvotes: 2