0

Is there an upper limit to the major/minor/patch components of a Nuget package version?

For instance, can I create MyPackage.1.99999.99999 and upload to Artifactory or Nuget.org and clients will have no issues referencing the package?

Dror Bereznitsky
  • 20,048
  • 3
  • 48
  • 57
user2966445
  • 1,267
  • 16
  • 39

2 Answers2

1

Nuget is using Semver as its versioning scheme.
Semver 2.0 does not define a size for the numeric identifiers.
It does recommend a limit of 255 characters for the entire string in its FAQ.
Since this is not part of the spec you can expect different implementations to have their own limitation.

Dror Bereznitsky
  • 20,048
  • 3
  • 48
  • 57
0

Yes there is an upper limit to the version components of an NuGet package.

NuGet parses the Version using System.Version. Since the Major/Minor/Build-Properties are Int32, the highest possible Version of an NuGet package would be 2147483647.2147483647.2147483647

There is also an (at the time of writing) open Issue on the missing documentation on this in the NuGet Issue Tracker.

DaBeSoft
  • 49
  • 1
  • 5