Syncfusion.Grid.WinUI and AOT crashes
Hi there, is your WinUI components AOT compatible?
- create a WinUI3 packed project
- add Syncfusion.Grid.WinUI nuget
- insert this line to App constructor (of course with my valid license key) Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR LICENSE KEY");
- set this in project file <PublishAot>True</PublishAot>
- I get this error when I try to start/debug my app
I uploaded my VS2022 project. If you change <PublishAot> to false, the app will work, but when it is true, the app crashes.
Thanks,
Karoly
Attachment: WinUI3Aot_2e455a36.zip
Currently, our Syncfusion WinUI controls do not support AOT (Ahead-of-Time) compilation. We are actively investigating the feasibility of adding AOT support, but we are encountering some issues during the process. We were checking with Microsoft regarding the issues. You can also find the link below.
Link: Issue
Once the issues are resolved and our controls are fully compatible with AOT, we will inform you further and include it in one of our upcoming releases. We appreciate your patience in the meantime.
Regards,
Manikanda Akash
Hi Manikanda, thanks for quick reply.
Ok, I see, I will wait for your feedback.
One thing I would mention is if I don't add your Grid Nuget and call RegisterLicense method I can compile/publish my WinUI3 app with AOT without any problem.
Thanks,
Karoly
Hi!
Any news about this?
I still have this issue and I'm wondering I could ever use Syncfusion components with my WinUI3 AOT apps or I should find any other components instead?
Th
Hi Karoly,
Currently, we are following the GitHub team for an update on
the reported issue that we are facing in our control. Once we got any update
and tested our control. We will let you know the details.
Regards,
Sudharsan
Hi!
It has been another year since the last update. Has there been any progress on NativeAOT support for the Syncfusion.Grid.WinUI controls?
Regards,
Constantin
Attachment: Screenshot_20260715_154805_386f5683.png
Hi Constantin Schlüter,
As the issue appears to originate from the framework side, we are coordinating with the GitHub team for updates on the reported problem affecting our control. In the meantime, we will wait until Microsoft provides a fix. Once we receive an update and validate our control, we will share the details with you.
Regards,
Jothika M
Hi Jothika,
Thanks for the quick reply, could you provide links to the GitHub issues so that people can help making trimming and NativeAOT possible. At the end of the day its a deal breaker for many apps that utilize NativeAOT that currently either can't use Syncfusions controls at all or have to disable NativeAOT globally.
Regards,
Constantin
Hi Constantin Schlüter,
We have reported the issue to Microsoft again. Please find the details of the reported link below:
Regards,
Jothika M
Hi Constantin Schlüter,
We have reported the issue to Microsoft again. Please find the details of the reported link below:
Regards,
Jothika M
Hi Jothika,
Thanks for getting back to me.
I replied on the GitHub issue here: https://github.com/microsoft/microsoft-ui-xaml/issues/11248#issuecomment-5023506320.
It appears NativeAOT support was postponed for nearly a year because of a supposed Microsoft blocker that ultimately wasn't a blocker at all.
I hope Syncfusion can prioritize bringing NativeAOT support for WinUI now.
Regards,
Constantin
Hi Constantin Schluter,
As per the GitHub suggestion, the provided solution works properly when the tag is added to the .csproj file, as demonstrated in the sample project. After verifying it with a custom sample using a native control, we confirmed that it works as expected.
However, when we tested it with our Syncfusion controls, we encountered an issue. We are currently investigating the problem. Once our testing is complete and we will report the issue to the Microsoft team, we will update you with further details.
Regards,
Sudharsan
- 11 Replies
- 5 Participants
- Marked answer
-
KA Karoly
- Nov 25, 2024 08:53 PM UTC
- Jul 23, 2026 06:24 AM UTC