-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
WPF application uses different versions of .NET runtimes #54669
Comments
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. |
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov Issue DetailsDescriptionI have WPF application with generated
The application uses two different runtime versions at the same time. Looks like, Sample project: https://github.com/duskembayev/dotnet_runtime_issue_54669 ConfigurationOS Name Microsoft Windows 10 Enterprise
Other informationIt works properly if I declare explicitly all frameworks in
|
The runtime config of the {
"runtimeOptions": {
"tfm": "net5.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "5.0.6",
"rollForward": "LatestPatch"
}
}
} So it explicitly allows latest patch. The rollfoward setting is not inherited, each framework reference defines it anew. I understand that in this specific case it probably doesn't do what you want. At the same time, declaring all framework references explicitly in this case doesn't seem like a terrible solution. The framework resolution algorithm is described here: https://github.com/dotnet/runtime/blob/main/docs/design/features/framework-version-resolution.md. Although this particular case is probably not covered there. |
Thanks, @vitek-karas. Currently, I'm looking for the right way to generate Could you, please, suggest a solution? |
I'm no aware of any which is directly built into the SDK. You can create a post-build step which overwrites the file. Just curious: Why is it important to you to disable roll-forward completely? |
Yes, I know, but this way doesn't look right. Maybe in future versions, there will be better ways to do such customizations.
The sample above is just for demonstration. Actually, real application delivered to end-user with customized runtime and CLR hosting. That's why at the current stage of development we want to ensure that the exact version of the runtime is used. Anyway, current behavior looks very strange. I'm sure that Thanks! |
The reason for allowing patch roll-forward are security patches - let's say we need to patch the NetCore.App, if the versions were 100% rigid, we would also have to release a new version of WindowsDesktop, just to allow the higher version of NetCore.App.
So you install your customized runtime into a global location? (like Program Files) If you're not, then I don't see the need to freeze the versions since you would have full control over the install location (not allowing any other versions there). |
We install runtime into a custom (not global) location. But it can contain multiple versions of runtime (i.e. 5.0.6, 5.0.7, 6.0.0, etc.) at the same time. As I said before, we implemented some CLR customizations (such as custom location, sandboxing, custom clr hosting, plugin system). If you are interested in our cases - I can provide more details privately (email or call). We will be happy to discuss the implemented solutions. |
Description
I have WPF application with generated
.runtimeconfig.json
The application uses two different runtime versions at the same time. Looks like,
Microsoft.NETCore.App
framework ignoresrollForward
option.Sample project: https://github.com/duskembayev/dotnet_runtime_issue_54669
Configuration
OS Name Microsoft Windows 10 Enterprise
Version 10.0.18363 Build 18363
Other information
It works properly if I declare explicitly all frameworks in
.runtimeconfig.json
The text was updated successfully, but these errors were encountered: