This project is read-only.

This very simple program does one thing: set the version number inside a NuGet .nuspec formatted file.
The program accepts two arguments:

1. The first is the name of the file to modify
2. The version number

Either and both arguments are optional, and the program will generally figure out what you're passing to it.
If you do not specify a file name, then the program will search the current directory for a .nuspec file; if it finds exactly one then it will update that file, otherwise the program will fail.
If you do not specify a version number then the program will simply increment the build number within the file (that is, add 0.0.1 to the existing version number).

So from your build script you can simply call:


and it will typically "do the right thing", however to set the version number in d:\dev\someproject\SomeProject.nuspec to be 1.2.3:

SetNuGetVersionNumber d:\dev\someproject\SomeProject.nuspec 1.2.3

Or, to simply increment the existing version number by 0.0.1 you could call:

SetNuGetVersionNumber d:\dev\someproject\SomeProject.nuspec

Finally, to set the version number to 3.2.5 of the only .nuspec file in the current working directory, you could also call:

SetNuGetVersionNumber 3.2.5

Last edited Mar 6, 2011 at 1:23 AM by RobertMcCarter, version 3


No comments yet.