NuGet version

https://stackoverflow.com/questions/15964935/get-nuget-exe-version-from-command-line

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

官网下载,然后直接放在C:Windows目录下。因为这个目录默认是在环境变量里的。这样就可以直接从cmd中使用。

C:WINDOWSsystem32>nuget help
NuGet Version: 4.9.3.5777
usage: NuGet <command> [args] [options]
Type 'NuGet help <command>' for help on a specific command.

Available commands:

add Adds the given package to a hierarchical source. http sources are not supported. For more info, goto
https://docs.nuget.org/consume/command-line-reference#add-command.

config Gets or sets NuGet config values.

delete Deletes a package from the server.

help (?) Displays general help information and help information about other commands.

init Adds all the packages from the <srcPackageSourcePath> to the hierarchical <destPackageSourcePath>. h
ttp feeds are not supported. For more info, goto https://docs.nuget.org/consume/command-line-referen
ce#init-command.

install Installs a package using the specified sources. If no sources are specified, all sources defined in
the NuGet configuration file are used. If the configuration file specifies no sources, uses the defa
ult NuGet feed.

list Displays a list of packages from a given source. If no sources are specified, all sources defined in
%AppData%NuGetNuGet.config are used. If NuGet.config specifies no sources, uses the default NuGet
feed.

locals Clears or lists local NuGet resources such as http requests cache, temp cache or machine-wide global
packages folder.

pack Creates a NuGet package based on the specified nuspec or project file.

push Pushes a package to the server and publishes it.
NuGet's default configuration is obtained by loading %AppData%NuGetNuGet.config, then loading any
nuget.config or .nuget uget.config starting from root of drive and ending in current directory.

restore Restores NuGet packages.

setApiKey Saves an API key for a given server URL. When no URL is provided API key is saved for the NuGet gall
ery.

sign Signs a NuGet package with the specified certificate.

sources Provides the ability to manage list of sources located in %AppData%NuGetNuGet.config

spec Generates a nuspec for a new package. If this command is run in the same folder as a project file (.
csproj, .vbproj, .fsproj), it will create a tokenized nuspec file.

trusted-signers Provides the ability to manage the list of trusted signers.

update Update packages to latest available versions. This command also updates NuGet.exe itself.

verify Verifies a signed NuGet package.

For more information, visit http://docs.nuget.org/docs/reference/command-line-reference

原文地址:https://www.cnblogs.com/chucklu/p/10394239.html