Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to publish nuget prerelease version package

I understand how to publish a nuget package using nuget command line

nuget command line

But I Have searched around I don't find docs about how to publish a nuget prerelease package

enter image description here

like image 901
icn Avatar asked May 14 '12 21:05

icn


2 Answers

You only need to specify a version string that uses SemVer format (e.g. 1.0-beta) instead of the usual format (e.g. 1.0) and NuGet will automatically treat it as a prerelease package.

"As of NuGet 1.6, NuGet supports the creation of prerelease packages by specifying a prerelease string in the version number according to the Semantic Versioning (SemVer) specification." See NuGetDocs - Prerelease Versions

like image 86
Alexandre Dion Avatar answered Sep 21 '22 16:09

Alexandre Dion


Also, prerelease version don't show up if their version number is lower than the stable version. For example if you have

  • MyNuget v1.0.26
  • MyNuget v1.0.25-beta

Only the stable version will appear in the list.

If you have

  • MyNuget v1.0.26
  • MyNuget v1.1.25-beta

The Prerelease version will be installable.

like image 41
Luk Avatar answered Sep 22 '22 16:09

Luk