Syncfusion.Grid.WinUI and AOT crashes

Hi there, is your WinUI components AOT compatible?


  1. create a WinUI3 packed project
  2. add Syncfusion.Grid.WinUI nuget
  3. insert this line to App constructor (of course with my valid license key) Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR LICENSE KEY");
  4. set this in project file  <PublishAot>True</PublishAot>
  5. I get this error when I try to start/debug my app
  6. CrashedGridAot.png



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

11 Replies 1 reply marked as answer

MA Manikanda Akash Munisamy Syncfusion Team November 26, 2024 09:18 AM UTC

Hi Karoly,

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

Marked as answer

KA Karoly November 26, 2024 09:35 AM UTC

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






KA Karoly July 27, 2025 11:54 AM UTC

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



SN Sudharsan Narayanan Syncfusion Team replied to Karoly July 28, 2025 03:37 PM UTC

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



CS Constantin Schlüter July 15, 2026 02:17 PM UTC

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

Image_9754_1784124851896



JM Jothika Murugesan Syncfusion Team July 17, 2026 06:35 AM UTC

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



CS Constantin Schlüter July 17, 2026 11:29 AM UTC

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



JM Jothika Murugesan Syncfusion Team July 20, 2026 02:33 PM UTC

Hi Constantin Schlüter,


We have reported the issue to Microsoft again. Please find the details of the reported link below:

Exception thrown when enabling the PublishAot tag with a custom control in WinUI · Issue #11248 · microsoft/microsoft-ui-xaml


Regards,

Jothika M



JM Jothika Murugesan Syncfusion Team July 20, 2026 02:33 PM UTC

Hi Constantin Schlüter,


We have reported the issue to Microsoft again. Please find the details of the reported link below:

Exception thrown when enabling the PublishAot tag with a custom control in WinUI · Issue #11248 · microsoft/microsoft-ui-xaml


Regards,

Jothika M



CS Constantin Schlüter July 20, 2026 02:49 PM UTC

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



SN Sudharsan Narayanan Syncfusion Team July 23, 2026 06:24 AM UTC

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


Loader.
Up arrow icon