Version option for nuget.exe CLI Pack command
description
I would like the ability to override the Version specified in the .nuspec file from the nuget.exe command line.
Ex: nuget.exe pack mypackage.nuspec -version 1.2.3
would create a package with version 1.2.3, regardless of the version in the .nuspec file.
This will greatly simply automated build scenarios, and avoid duplication (most projects already store version information somewhere else in their code tree). I shouldn't have to update my VERSION.txt and .nuspec file every time I increment the version.
Fortunately, it looks like it would be easy to implement (I'll volunteer if others agree it should be done). I would probably add the following line immediately after the PackageBuilder is constructed in PackCommand.ExecuteCommand:
if (!String.IsNullOrEmpty(Version)) builder.Version = new Version(Version);