-
-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blazor map control crashes when AOT compiled #2705
Comments
Have you tried targeting .NET 9 Preview (Has some AOT Improvements) |
I have not, will give it a go. Was just curious or after some independent confirmation that the map control should AOT ok in mapsui 5? |
Theoretically yes. But the publish for the Sample Page the AOT is currently disabled. For testing i enabled AOT and it still worked. So that's why I'm asking for a sample that reproduces the behavior. |
There you go boss
Two publish configs in MapAotTest.Client.csproj, config 1 works, config 2 produces the error I described. |
So at the moment it seems not to be 100% compatible with AOT because of Third Party dependencies (SkiaSharp), So when SkiaSharp is released in Version 3.0.0 I could have a look at it again, Currently I cannot do so much. |
With .Net 9 and SkiaSharp 3 (Beta) in AOT following Compilation Error occours
So I think this could be the problem why it doesn't start up because jsinterop is important for webassembly functionality, I think when SkiaSharp is updated to .NET 8 this sould be solved. |
Thanks for taking a look and shinning some light on the issue. I have mapsui built into my blazor app now and its awesome, just this one issue blocking me giving the app the AOT perf boost it needs. Fingers crossed skia 3 resolves, cheers fella. |
Working great now in beta 7. |
Mapsui Version
5 beta 1, 5 beta 2
Mapsui Platform
Blazor
Device
Windows 10, Microsoft Edge browser.
Describe the bug
When publishing a blazor project with AOT disabled, mapsui map control works correctly. Publishing same project with AOT enabled, map control fails to render and throws an unhandled exception.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Map control renders on page.
Screenshots
Additional context
Map control fails to render and I get the above exception in the browser developer console. Call stack is not particularly helpful, only thing that seems applicable are some references to skia canvas rendering, but don't really understand what I'm looking at.
The text was updated successfully, but these errors were encountered: