-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 improvements for COM #3434
Comments
Nit: The existing setting in runtimeconfig is spelled |
@nguerrera correct (for some reason I was thinking about command line syntax) |
lgtm |
Isn't |
This seems like a reasonable versioning story. For confirmation, this new property would now be added to all |
I think I would prefer a default behavior which didn't require a .runtimeconfig.json. |
Do you mean the actual existence of the file or the new property? Not having a file at all is a non-starter because we need to know which framework to use and making that optional is going to make it an ambiguous scenario with the apphost/standalone scenario - no |
It was a non-starter in the original discussion, but now it is not. The
Not sure that assumption is necessary. Not sure why it would matter:
|
I am on the fence if COM components should have this behavior by default. I am happy we are heading down the path of adding the flag, and we can make the call on which value COM components will have by default. |
@sdmaclea Which shared framework does the COM server use? We have ASP.NET, or APP? how do we decide in this case? And what about other future shared frameworks? Right now we require @jeffschwMSFT Which behavior are you referring to? |
The proposal was that leaving the setting out (like existing files) would mean |
@AaronRobinsonMSFT my comment aligns with what @vitek-karas points out. |
Updated the issue to point to dotnet/designs#51 which supercedes this. I'll keep this issue open for now as it discusses COM specific scenarios. |
The new roll forward is designed in COM components should use one of the The only remaining work item is to implement a reasonable default. |
The designed behavior |
Scenarios
COM components - these are loaded into already running process
Apps which plan on hosting COM components
Assumptions
Solution
When loading a component into existing .NET Core process the component has to use the existing CLR/Frameworks. But if the component is being loaded into a native process which doesn't have a CLR yet, it needs to start one. In this case it's important to pick the right version of the CLR (and frameworks) to start, as everything else done by the process will have to use that version.
In order to get the highest success rate of activation it's necessary to ensure that the CLR (and frameworks) in the process fulfills the requirements of the most components. Ultimately there's no 100% solution as there could be components which simply can't work together.
With the assumptions above, the highest success rate will be achieved by running the latest available runtime/framework on the machine. This means that we can't use the existing framework resolution logic because that tries to load the closest available version.
This new behavior would be needed by both
.runtimeconfig.json
will be used to do so, and thus the new algorithm needs to be used on them..runtimeconfig.json
and thus might want this new behavior as well.Proposal
Addroll-forward-to-latest
setting to the.runtimeconfig.json
properties (globally and for completeness per-framework as well).0
- don't roll forward - default. This is the current behavior and would be left as is.1
- latest minor - roll forward to the latest minor version available on the machine.2
- latest major.minor - roll forward to the latest major and minor version available on the machine.A new setting is being proposed which will cover both the existing
roll-forward-on-no-candidate-fx
and the new oneroll-forward-to-latest
. See dotnet/designs#51.Ease of use
An MSBuild property will be added to set this value in the project file.
For COM components, (when
UseCom
is set), the default value of that property will be set to roll forward to latest major. But the default would only be applied in MSBuild, the value would still be explicitly written to the.runtimeconfig.json
in that case.Apps (like the sample above of .NET Core app loading COM components) would be able to set this as well via explicit action.
The text was updated successfully, but these errors were encountered: