Select to view content in your preferred language

WinUI Crash in Release

91
4
Jump to solution
Tuesday
Labels (1)
Jube
by
Emerging Contributor

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

 $exceptionInternal 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.

0 Kudos
1 Solution

Accepted Solutions
dotMorten_esri
Esri Notable Contributor

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.

View solution in original post

4 Replies
dotMorten_esri
Esri Notable Contributor

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?

0 Kudos
Jube
by
Emerging Contributor

No I have not enabled PublishAoT.
Here is a git repo: https://github.com/julien-bertolini/WinUI-ArcGIS-TestApp.git

Thanks for your help.

0 Kudos
dotMorten_esri
Esri Notable Contributor

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.

Jube
by
Emerging Contributor

Ok it works, thanks!

0 Kudos