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

Native AOT doesn't work with Windows Forms #34129

Closed
mikola-akbal opened this issue Jul 20, 2023 · 3 comments
Closed

Native AOT doesn't work with Windows Forms #34129

mikola-akbal opened this issue Jul 20, 2023 · 3 comments
Labels
Area-NativeAOT Native AOT compilation

Comments

@mikola-akbal
Copy link

mikola-akbal commented Jul 20, 2023

I add to the .NET 7 .csproj file following:

<PublishAot>true</PublishAot>
<_SuppressWinFormsTrimError>true</_SuppressWinFormsTrimError>

When I try to publish, I get unknown error.

Could you, please, make Windows Forms compatible with trimming? I love Windows Forms. I would prefer compile my applications to native code.

Can you estimate when Native AOT will support Windows Forms?

Can I compile Windows Forms assemblies without trimming? Is there some option to manage it? This option can be fast solution of this problem. The executable will be big, but it will be. When trimming of Windows Forms will be realized, executable will become small.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-NetSDK untriaged Request triage from a team member labels Jul 20, 2023
@vitek-karas
Copy link
Member

The tracking issue for WinForms trim compatibility is here: dotnet/winforms#4649
Trimming is necessary for AOT, so that's the first step.

@mikola-akbal
Copy link
Author

The tracking issue for WinForms trim compatibility is here: dotnet/winforms#4649

OK.

@nagilson
Copy link
Member

I'm glad to see there is demand for the feature :) You'll have to ask about the time estimates for the work on that issue, though I would imagine there are 'goals' set more so than a firm date we would be able to give you yet. I am not involved with that effort or their timeline.

@nagilson nagilson added Area-NativeAOT Native AOT compilation and removed untriaged Request triage from a team member Area-NetSDK labels Jul 25, 2023
@nagilson nagilson removed their assignment Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-NativeAOT Native AOT compilation
Projects
None yet
Development

No branches or pull requests

3 participants