1

Hi I have created very basic class library project and created .nupkg. I am trying to push package using the below command nuget.exe push -Source -ApiKey az . To my bad whenever I do it says

'nuget.exe' is not recognized as an internal or external command,
operable program or batch file.

When I search over the internet It says to download nuget.exe so I navigated to nuget download page. To my bad It says nuget.exe comes by default with VS 2019. I am using VS 2019. I am not able to understand whats wrong with these documentation Or I am misunderstanding all these documentations? Can someone help me to identify where should I download or If I exist where is the path and how should I run above command? Any help would be appreciated. Thanks

Mr Perfect
  • 585
  • 8
  • 30
  • Agree with Martin's answer that ```nuget.exe``` can be downloaded from https://www.nuget.org/downloads under "Windows x86 Commandline". After you download it, you could open command line window and switch to its download directory to run this command ```nuget.exe push -Source -ApiKey az.``` See: [Publish a NuGet package using the command line](https://learn.microsoft.com/en-us/azure/devops/artifacts/nuget/publish?view=azure-devops#publish-packages-by-using-the-command-line) for more guidance. – Edward Han-MSFT Apr 15 '21 at 09:52

1 Answers1

3

nuget.exe can be downloaded from https://www.nuget.org/downloads under "Windows x86 Commandline".

Visual Studio 2019 Contains all NuGet tools, so there are no VSIX packages to install for NuGet support as in previous VS versions.

Do note that depending on your selected workloads, Visual Studio will also install the dotnet CLI as part of the .NET SDK. So you can also use dotnet nuget push, which has slightly different arguments (--source and --api-key, check with dotnet nuget push -h)

Martin Ullrich
  • 94,744
  • 25
  • 252
  • 217