Welcome to the .NET MAUI feedback portal. We’re happy you’re here! If you have feedback on how to improve the .NET MAUI, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
Android .Net 8 fails to initialise the application in release mode, but starts successfully in debug mode.
Even in debug mode, an exception is raised if the following properties are added.
<PropertyGroup>
<MauiXamlCValidateOnly>False</MauiXamlCValidateOnly>
<_MauiForceXamlCForDebug>True</_MauiForceXamlCForDebug>
</PropertyGroup>
I suspect that this is the same as the one in the URL below.
https://www.syncfusion.com/feedback/44143/system-methodaccessexception-method-syncfusion-maui-core-sfview-add
The error occurs when placing a control such as StackLayout inside a SfButton.
Please check.
Thanks.
<buttons:SfButton
x:Name="CounterBtn"
Text="Click me"
SemanticProperties.Hint="Counts the number of times you click"
Clicked="OnCounterClicked"
HorizontalOptions="Fill" >
<StackLayout Orientation="Horizontal" Padding="10,0" HorizontalOptions="Center" >
<Label BackgroundColor="Transparent" />
</StackLayout>
</buttons:SfButton>