MAUI app crashing with release mode. Works fine with debud mode ?

KallemSandeep-8232 36 Reputation points
2023-12-13T16:27:12.44+00:00

MAUI app crashes with release mode. Works fine with debug mode.

Targeting .net run time is .net 7.0. We are using a few syncfusion controls in our application. Those nuggets were up to date till now.

Here are the crash details:

System.MethodAccessException: Method `Syncfusion.Maui.Core.SfView.Add(Microsoft.Maui.Controls.View)' is inaccessible from method xyz.

Any suggestions on this, please.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,968 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Chuck C Giddens 10 Reputation points
    2024-04-29T17:04:17.7066667+00:00

    99.9% of the time this is due to a missing Style or StyleClass reference using StaticResources. This is truely a whomping pain in the neck since there is NO WARNING during debug that this is an issue. It only appears when detached debugger or release builds. TRULY A BIG MISSING FEATURE for the build to tell me that a StaticResource does not exist...then just crash on load with NO ERROR REPORTING.

    1 person found this answer helpful.
    0 comments No comments