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

Roll forward LatestMajor needs a max version setting #45306

Closed
rseanhall opened this issue Nov 29, 2020 · 4 comments
Closed

Roll forward LatestMajor needs a max version setting #45306

rseanhall opened this issue Nov 29, 2020 · 4 comments
Labels
area-Host untriaged New issue has not been triaged by the area owner

Comments

@rseanhall
Copy link
Contributor

WiX has an application, Heat, that dynamically loads Microsoft.Build.dll and Microsoft.Build.Framework.dll. I recently had to update the roll forward policy to LatestMajor (https://github.com/wixtoolset/Tools/pull/56) so it could continue to support running on 2.1 while also be able to load MSBuild 16.8 assemblies, which were compiled for net5.0.

With the existence of both the Major and LatestMajor policies, it seems that at some point in the future an app could be broken if it rolls forward too far. Let's say this happens to my app in .NET 6. I want the ability to compile it once for [2.1, 6.0) and then again for [6.0, infinity). As far as I know, the only way to get the latest runtime in [2.1, 6.0) is to write a custom host which is not something I want to do for this. I want something like a MaxRollForwardVersion setting so I can specify that it shouldn't be rolled forward to 6.0 but can be rolled forward to any version of 5.x.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Nov 29, 2020
@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ghost
Copy link

ghost commented Nov 30, 2020

Tagging subscribers to this area: @vitek-karas, @agocke
See info in area-owners.md if you want to be subscribed.

Issue Details

WiX has an application, Heat, that dynamically loads Microsoft.Build.dll and Microsoft.Build.Framework.dll. I recently had to update the roll forward policy to LatestMajor (https://github.com/wixtoolset/Tools/pull/56) so it could continue to support running on 2.1 while also be able to load MSBuild 16.8 assemblies, which were compiled for net5.0.

With the existence of both the Major and LatestMajor policies, it seems that at some point in the future an app could be broken if it rolls forward too far. Let's say this happens to my app in .NET 6. I want the ability to compile it once for [2.1, 6.0) and then again for [6.0, infinity). As far as I know, the only way to get the latest runtime in [2.1, 6.0) is to write a custom host which is not something I want to do for this. I want something like a MaxRollForwardVersion setting so I can specify that it shouldn't be rolled forward to 6.0 but can be rolled forward to any version of 5.x.

Author: rseanhall
Assignees: -
Labels:

area-Host, untriaged

Milestone: -

@vitek-karas
Copy link
Member

Basically this exact request is already part of this epic: #43332

Specifically this part:

Support version ranges when specifying framework references and SDK versions

My current thinking is to support basically the same syntax which NuGet supports for versions - but in the .runtimeconfig.json
The roll forward policy would still apply - it would determine which exact version to pick from that range.
It's not that different from the current behavior, the only difference is that currently the upper bound is determined by look at the available versions on the machine. With the version range the upper bound would the minimum of the one specified in the config and what's available on the machine.

@vitek-karas
Copy link
Member

Closing this in favor of #43332.

@ghost ghost locked as resolved and limited conversation to collaborators Aug 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Host untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

4 participants