Reputation: 193
I have a MAUI app that is build on abp.io commercial framework that works fine in debug mode, but crashes in release mode. I have looked at so many issues on StackOverflow about MAUI apps crashing in release mode, but none of the solutions suggested works for me.
The iOS version of the app launches and brings up the splash screen, then immediately crashes. The Android version works fine in either mode.
I've tried changing the debug symbol to "full" and disabling optimization, but it has no impact on the problem.
I was using .net6 and had several other problems with even compiling the app in release mode (generated an error every time because it tried to compile the 3 referenced projects that are .net standard 2.1 class libraries complaining that they didn't target .net6.0-ios). I changed the project to use .net7 and can compile the app without the same issues with the referenced projects.
At one point the debug version was even crashing and it generated 2 different errors: The first stated that the AppDelegate did not contain a non-parameter constructor (which it does), and the second error was that it could not cast it to a class that was related to UI control (made no sense).
I have been fighting with this for over a month and each time the VS dev environment updates with new workloads or version of the Mac app, the errors change and the problem is not resolved.
Any help that can be provided is appreciated.
Upvotes: 3
Views: 1373
Reputation: 69
Try uncheck AOT compilation. It helped me solve the problem(VS2022 preview .Net7 MAUI Android)
Upvotes: 0