A major release to support arbitrary-sized version numbers, prevent invalid version numbers, remove obsolete functionality, and strong name the assembly.
Breaking Changes:
SemVersion.Parse
andSemVersion.TryParse
now default to strict parsing. UseSemVersionStyles
to control parsingSemVersion.Major
,SemVersion.Minor
,SemVersion.Patch
, andPrereleaseIdentifier.NumericValue
properties are nowBigInteger
(#73)- Removed obsolete methods (#70, #47), including:
- Implicit conversion from
string
(#47). UseSemVersion.Parse
instead SemVersion(int major, int minor = 0, int patch = 0, string prerelease = "", string build = "")
constructor. Use another constructor orSemVersion.ParsedFrom
insteadSemVersion.Parse
andSemVersion.TryParse
overloads with thestrict
parameter. They now default to strict. UseSemVersionStyles
to control parsing- Comparison with
SemVersion.CompareTo
,SemVersion.Compare
,SemVersion.CompareByPrecedence
,<
,<=
,>
,>=
, orSemVersion.PrecedenceMatches
. UseSemVersion.ComparePrecedenceTo
,SemVersion.CompareSortOrderTo
,SemVersion.ComparePrecedence
, orSemVersion.CompareSortOrder
instead. SemVersion.Build
. UseSemVersion.Metadata
insteadSemVersion.Change
. UseSemVersion.With
orSemVersion.WithX
methods insteadSemVersion(Version)
constructor. UseSemVersion.FromVersion
instead
- Implicit conversion from
SemVersion
no longer implementsIComparable<SemVersion>
orIComparable
. UseSemVersion.PrecedenceComparer
orSemVersion.SortOrderComparer
instead- Added strong name to assembly (#23)
- Dropped support for frameworks older than .NET Standard 2.0 (i.e., .NET Framework < 4.6.2 & .NET Core < 2.0) (#68)
- Construction of versions with negative major, minor, or patch is no longer allowed (#40)
- Negative
maxLength
parameter values now throwArgumentOutOfRangeException
(#72)
Other Changes:
- Arbitrary-sized version numbers are now supported, including in prerelease identifiers (#73)