Skip to content

Floating references and NuGet package generation #11088

Answered by zivkan
RobSwDev asked this question in Q&A
Discussion options

You must be logged in to vote

https://docs.microsoft.com/en-us/nuget/concepts/package-versioning has more in depth documentation about versions, including ranges and floating versions.

In short, version x is equivalent to [x, ), so technically it is a range, just with no upper bound. This means that 4.1.* is equilvant to [4.1.*, ). If you want to upper bound it to 4.2.0, you should use [4.1.*, 4.2.0).

Next, NuGet is conservative when it comes to package compatibility. in the case of * or 1.*, according to SemVer2 rules, package authors can add new APIs. Therefore, if your project uses 1.*, it's not safe to assume that a dependency of 1.0 is the lower bound. Otherwise, when someone uses your package, they'd get the low…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@RobSwDev
Comment options

@zivkan
Comment options

@RobSwDev
Comment options

Answer selected by RobSwDev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants