Skip to content

[Problem/Bug]: Can't work with Winforms and NativeAOT #5238

Open
@Gascognya

Description

@Gascognya

What happened?

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

Before

Image

After

Image

Importance

Blocking. My app's basic functions are not working due to this issue.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

136.0.3240.64

SDK Version

1.0.3296-prerelease

Framework

Winforms

Operating System

Windows 10

OS Version

19045.5796

Repro steps

  • Create .NET 9 Winforms Project
  • Add WebView2 Nuget Package
  • Add WebView2 Control
  • Set PublishAot And _SuppressWinFormsTrimError

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions