Get NuGet.exe version from command-line

2019-03-22 10:28发布

I'd like to get the NuGet.exe version using the command-line.

I know I can get the version of NuGet running as part of Visual Studio, as per the instructions here, but what I'm after is something similar from the command-line, i.e like:

nuget --version

Any ideas?

3条回答
贪生不怕死
2楼-- · 2019-03-22 10:40

Windows Powershell:

nuget help | select -First 1

enter image description here


Command line (cmd.exe) | Package Manager Console in Visual Studio

1.) nuget ? v
2.) nuget help v

enter image description here

The "v" command is actually not valid, but with this approach you only get the nuget version number and below the information that "v" is an unknow command.

查看更多
手持菜刀,她持情操
3楼-- · 2019-03-22 10:41

To know which version of NuGet is installed use follow steps

  • In Visual Studio, use the Help > About Microsoft Visual Studio command and look at the version displayed next to NuGet Package Manager.

  • Alternatively, launch the Package Manager Console (Tools > NuGet Package Manager > Package Manager Console) and enter $host to see information about NuGet including the version.

查看更多
成全新的幸福
4楼-- · 2019-03-22 11:05

Typing nuget help from the command line will in addition to the expected help information also list the current NuGet.exe version.

查看更多
登录 后发表回答