I have created a new app from scratch from the VisualStudio WinUI blank packaged app template.
When I run the app in both Debug and Release, the app shows up as expected.
I added the SceneView control from Esri.ArcGISRuntime.WinUI 200.6 nuget package.
When I build and run in Debug, it works and I can see the map.
But in Release, it crashes in XamlTypeInfo.g.cs with:
Exception thrown: 'System.NullReferenceException' in WinRT.Runtime.dll
$exception | Internal error in the C# compiler |
Don't know if it is relevant since it is in Release. See attached screenshot.
Am I missing something?
Thanks.
Solved! Go to Solution.
Sorry I meant trimming and not AoT.
Remove the trimming you define here: https://github.com/julien-bertolini/WinUI-ArcGIS-TestApp/blob/4a2463e2825c656f95c212f939e7477c155fad...
Our next release should support this better.
Do you have PublishAoT enabled? (200.6 doesn't support it - we'll have partial support for it in 200.7).
Could you possibly share the project that crashes?
No I have not enabled PublishAoT.
Here is a git repo: https://github.com/julien-bertolini/WinUI-ArcGIS-TestApp.git
Thanks for your help.
Sorry I meant trimming and not AoT.
Remove the trimming you define here: https://github.com/julien-bertolini/WinUI-ArcGIS-TestApp/blob/4a2463e2825c656f95c212f939e7477c155fad...
Our next release should support this better.
Ok it works, thanks!