-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
nativeAOT whether to support winform or wpf programs? #79166
Comments
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsIf it's not currently supported, is it possible that it will be supported in the future? Or will MAUI's nativeAOT be supported in the future?
|
Only console apps are supported in .NET 7. You'll have to go to individual repos to see their status and roadmaps. WinForms in particular has been adding a lot of trimming and ComWrappers improvements -- those should make it much more likely that you could AOT a WinForms app. See dotnet/winforms#5163 for more info. For WPF, there has not been as much progress. WPF uses a lot more reflection, so it's a much bigger task dotnet/wpf#3811 |
If you will consider community supported solution, you may take a look at my library https://github.com/kant2002/winformscominterop#getting-started which allow you to run your WinForms app even now. There some limitations regarding localization/ResX files support, but that's more of NativeAOT solution. WinForms working on improving support for NativeAOT and some work already in .NET 7. I would say WinForms apps can be AOT-ed right now. Regarding WPF that's still doable, but require you to take controlled risks. There experimental fork from which you can build (really trivial) WPF and use that version for applying NativeAOT for your app. If somebody interested enough to try that variant on their small app, let me know. I can try improving that work. |
And in such cases you might want to consider community UI frameworks with official NativeAOT support like Avalonia instead. |
Duplicate of dotnet/winforms#4649 and dotnet/wpf#3811 |
If it's not currently supported, is it possible that it will be supported in the future? Or will MAUI's nativeAOT be supported in the future?
The text was updated successfully, but these errors were encountered: