According to the documentation, pre-release versioning is supported, with an example given of:
Within the NuSpec file, specify the version in the element
<version>1.0.1-alpha</version>
I am building from a .nuspec file; if I include this line verbatim, then run (at the package manager console):
PM> nuget pack "Nuget\protobuf-net.nuspec"
then I get a bit fat error:
Attempting to build package from 'protobuf-net.nuspec'.
NuGet.exe : Input string was not in a correct format.
At line:1 char:6
+ nuget <<<< pack "Nuget\protobuf-net.nuspec"
+ CategoryInfo : NotSpecified: (Input string wa...correct format.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
If, however, I just use <version>1.0.1</version>
and run exactly the same command, then I get:
Attempting to build package from 'protobuf-net.nuspec'.
Successfully created package 'C:\Dev\protobuf-net\protobuf-net.1.0.1.nupkg'.
And indeed, it has built correctly. My NuGet Package Manager reports version 2.0.30625.9003.
So: am I doing something wrong? or did they break something?
Right-click the Packages folder in the project, and select Update. This will update the NuGet package to the latest version. You can double-click the Add packages and choose the specific version.
NuGet 4.3. 0+ supports SemVer 2.0. 0, which supports pre-release numbers with dot notation, as in 1.0.
NuGet Version: 1.5.21005.9019
Semantic versioning was introduced in nuget 1.6. Time for an upgrade. You can use nuget update -self
to update right from the command line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With