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

KallemSandeep-8232 41 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.

Developer technologies | .NET | .NET MAUI
{count} votes

1 answer

Sort by: Most helpful
  1. Chuck C Giddens 15 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.

    2 people found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.