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

nativeAOT whether to support winform or wpf programs? #79166

Closed
fenginsc opened this issue Dec 2, 2022 · 5 comments
Closed

nativeAOT whether to support winform or wpf programs? #79166

fenginsc opened this issue Dec 2, 2022 · 5 comments

Comments

@fenginsc
Copy link

fenginsc commented Dec 2, 2022

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?

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Dec 2, 2022
@ghost
Copy link

ghost commented Dec 2, 2022

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

Issue Details

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?

Author: fenginsc
Assignees: -
Labels:

untriaged, area-NativeAOT-coreclr

Milestone: -

@agocke
Copy link
Member

agocke commented Dec 2, 2022

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

@kant2002
Copy link
Contributor

kant2002 commented Dec 3, 2022

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.

@MichalPetryka
Copy link
Contributor

If you will consider community supported solution

And in such cases you might want to consider community UI frameworks with official NativeAOT support like Avalonia instead.

@jkotas
Copy link
Member

jkotas commented Dec 3, 2022

Duplicate of dotnet/winforms#4649 and dotnet/wpf#3811

@jkotas jkotas closed this as completed Dec 3, 2022
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Dec 3, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jan 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants