Reputation: 13106
According to the page at: https://dist.nuget.org/index.html
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!
No matter whether I open a Visual Studio 2017 command prompt or the Nuget console itself, running the 'nuget' command results in command not found.
How can I run the nuget CLI with Visual Studio 2017? What am I missing?
Upvotes: 43
Views: 30156
Reputation: 759
I think it is easier to recreate the assembly using a new project template called .NET Standard in Visual Studio 2017.
When I tried to change the old .csproj file, I broke the assembly.
Then I followed the instructions from this link Quickstart: Create and publish a NuGet package using Visual Studio (Windows only).
I hope this link will also help: NuGet is now fully integrated into MSBuild
Upvotes: 0
Reputation: 583
To use NuGet CLI, download the nuget.exe
from https://www.nuget.org/downloads page Windows x86 Commandline section.
Add the folder where you placed nuget.exe
to your PATH environment variable.
Open the command window or powershell anywhere and run any nuget command.
Or you can use directly from the Visual Studio 2017 package manager console.
(Visual Studio restart is required to get the PATH environment variable.)
Here is the MS Docs for NuGet CLI
Upvotes: 2
Reputation: 54801
Although it says "Batteries are included" on the page you have mentioned, that only refers to how the NuGet package manager is integrated with Visual Studio 2017. The other downloads on that page are for Visual Studio 2013-2015.
If you want the command line nuget.exe
in order to create NuGet packages, that is still a separate download on the page you mentioned: https://dist.nuget.org/index.html
Upvotes: 22