Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency resolution docs should be explicit floating versions and pre-release packages #4099

Closed
smarts opened this issue Dec 13, 2016 · 4 comments
Assignees
Milestone

Comments

@smarts
Copy link

smarts commented Dec 13, 2016

https://docs.nuget.org/ndocs/consume-packages/dependency-resolution#dependency-resolution-in-nuget-3-x
I don't see anything there that talks about pre-release packages in the context of floating versions, and I believe the documentation should be explicit about that. (I apologize if I've missed something)
Based on the rest of the documentation, if I have version 1.9.0 and 1.10.0-beta is available, NuGet 3.x will get the pre-release version. Whether this is true or not, I think it'd be good to update the documentation to be explicit about what happens. If this is true, then I think there should be a way to float versions without getting a pre-release version.

@rrelyea rrelyea added this to the 4.0 RC3 milestone Dec 13, 2016
@smarts
Copy link
Author

smarts commented Dec 16, 2016

Would you mind providing an explanation in lieu of the updated docs for now? That way I can decide whether I want another issue for a feature request or not.

@danielgreen
Copy link

danielgreen commented Apr 19, 2017

Having tested PackageReference in VS 2017, I found that 1.* would take the latest non-prerelease version.

So if the available packages are 1.5 and 1.6-beta, it will take 1.5.

I'd be interested to learn if other developers are seeing the same behaviour, and what the NuGet team think about including prerelease packages in that floating version (or whether a slightly different floating version could be supported, to indicate that prerelease packages should be included).

@spotlesscoder
Copy link

@danielgreen: Yes, this is the default behaviour but I want to be able to include prerelease versions, too

@karann-msft
Copy link
Contributor

Added documentation around that - https://docs.microsoft.com/en-us/nuget/reference/package-versioning#version-ranges-and-wildcards

Pre-release versions are not included when resolving version ranges. Pre-release versions are included when using a wildcard (). The version range [1.0,2.0], for example, does not include 2.0-beta, but the wildcard notation 2.0- does. See issue 912 for further discussion on pre-release wildcards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants