I want NuGet Version

May 17, 2011 at 10:29 PM

NuGet Pack is lovely, but honestly that's a lot of work just to bump up the version number of my spec file. I'd like to have NuGet.exe to update the spec file's version. That's it.

May 17, 2011 at 10:35 PM
Edited May 18, 2011 at 3:50 PM

Nuget pack MyPackage.nuspec -version


May 18, 2011 at 12:30 AM

No mention of that in the docs! :) Though running 'nuget pack -?' does say it:

  Version                      Overrides the Version number from the nuspec file.


May 18, 2011 at 3:33 AM

-version doesn't update the spec file. It just overrides it.

May 18, 2011 at 3:50 PM

BTW, I corrected my original post. It's not version = 1.2.3 it's -Version 1.2.3.

May 18, 2011 at 4:00 PM

On that note, I was looking at updating the Command Line Reference document and wanted to get your opinion. There’s two approaches we could take.

We could try and generate that page directly from the docs in the command line. That would make that page a complete documentation of NuGet.exe and always in sync with the actual command line docs. It would reduce duplication.

The other approach is to keep it small like it is and merely note that people should use the -? Option to get more info. Here’s an example of how we might change the Pack Command doc.

Which option do you think is better?

Pack Command

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


nuget pack <manifest> [options]


nuget pack

nuget pack foo

nuget pack foo

nuget pack foo
.nuspec -Version 1.1

For more information about Pack comamnd, run the following command.

nuget pack -?