Is it possible to pre-release versions in nuget

According to the documentation, a preliminary version of the versions is supported, with an example:

Inside the NuSpec file, specify the version in the element

<version>1.0.1-alpha</version> 

I am creating from a .nuspec file; if I include this verbatim line and then run (in the package manager console):

PM> nuget package "Nuget \ protobuf-net.nuspec"

then I get a little 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 the exact 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, he built correctly. My NuGet package manager reports version 2.0.30625.9003.

So: am I doing something wrong? or did they break something?

+8
versioning nuget
source share
1 answer

NuGet Version: 1.5.21005.9019

Semantic versioning introduced in nuget 1.6 . Update time. You can use nuget update -self to update directly from the command line.

+3
source share

All Articles