1

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.

4

1 回答 1

2

我所要做的就是将我的用户和所有用户的位置添加nuget.exePATH环境变量中,后者取决于你,但我总是将 VS 运行为Administrator.

过去的圣贤们总是建议不要这样做,但是 MS 在他们所有的神圣智慧中使得在非管理员帐户下使用 VS 的 Web 开发人员的生活变得如此困难,即使从 2010 年 VD 左右开始,我也几乎没有提到上述建议甚至。

你会认为 Nuget 作为 Visual Studio 的一部分安装,他们至少可以在 VS 安装中添加修改该血腥变量。

于 2017-02-22T07:29:03.470 回答