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

Parse .NET Core project.json version strings as VersionRange #741

Merged
merged 1 commit into from
Jul 11, 2016

Conversation

joelverhagen
Copy link
Member

Fix NuGet/Home#3070 and NuGet/Home#3095.

In a project.json you can specify a dependency with a version range, e.g. a floating version like 1.0.0-*. The problem was that we were simply parsing this string as a NuGetVersion (which is a specific version) not a VersionRange. This problem is only occurring in .NET Core project.json projects, not UWP project.json.

Right now, our UI has a limitation where it only shows a specific version (not a version range). For this reason, we will now parse this string as a version range but only display the minimum of the version range. This is not an ideal solution since it's ugly and unhelpful but we are already doing this today with UWP project.json projects. The improvement to the UI to display version ranges is tracked here: NuGet/Home#3101.

/cc @alpaix @yishaigalatzer @rohit21agrawal @mlorbetske

@joelverhagen
Copy link
Member Author

/cc @emgarten

@emgarten
Copy link
Member

This looks much better, but note that the min version could be null here. I'm not sure how the .NET core project system handles that. Ex: "nuget.versioning": "( , 3.0.0]" is valid in project.json.

@joelverhagen
Copy link
Member Author

Yes, this is a good point. However, this is already an issue in UWP project.json projects (tracked here:
NuGet/Home#3109). This PR simply makes .NET Core projects more consistent with UWP project.json.

Do you think it's reasonable address the minimum version problem as a separate PR?

@emgarten
Copy link
Member

Do you think it's reasonable address the minimum version problem as a separate PR?

yes

:shipit: 🚀

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

Successfully merging this pull request may close these issues.

3 participants