Exception being throuwn
I am trying to add an image editor to my Maui project, but I am getting this excepiton thrown on InitilizeCompent() part of the page:
{System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.TypeInitializationException: The type initializer for 'Syncfusion.Maui.ImageEditor.ImageEditorToolbarSettings' threw an exception.
---> System.TypeLoadException: VTable setup of type Syncfusion.Maui.ImageEditor.ImageEditorTextStyle failed
--- End of inner exception stack trace ---
It is a content page that is part of a tabbed page group.
xmlns:imageEditor="clr-namespace:Syncfusion.Maui.ImageEditor;assembly=Syncfusion.Maui.ImageEditor"
Is in the XAML along with:
<Frame x:Name="NoteFrame" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Grid.Row="1" Grid.Column="0" Margin="0" Padding="0">
<imageEditor:SfImageEditor x:Name="Notes" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" ShowToolbar="False" Background="#FFFFFF" Padding="0" Margin="0"/>
</Frame>
Hi Phunction,
Thank you for reaching out to us!
We have thoroughly reviewed your query and tested the reported issue. Based on our investigation, we were unable to replicate the issue on our end. The ImageEditor control is functioning as expected.
To assist further, we would appreciate it if you could share additional details such as:
.NET version: The .NET framework version you are targeting (.NET 8 or .NET 9)
Platform: On which platform are you experiencing the issue?
Package version: Please share the version of the Syncfusion NuGet package you're currently using.
Device details: If the issue is occurring on an Android or iOS platforms, please share the device details.
Code Snippet: Kindly share a code snippet from your project.
Replication video: If possible, share a video demonstrating the issue replication.
MAUI Version: Please share the version of Microsoft.Maui.Controls currently in use.
Reproduction in Sample: If possible, please try to reproduce the issue using the sample we attached.
We have prepared a simple sample demonstrating this, which is attached for your reference.
These details
will help us validate and address your query more effectively. We appreciate
your understanding on this.
Regards,
Tamilarasan G.
Attachment: MAUIImageEditorImpSample_21d5a963.zip
Ok, I am not sure what is going ont now, I updated to the latest sycnfusion from 26.x to 30.x and now any page with a syncfusion control is giving me the same error. This is for a .net 9 project on iOS. Both Simulator and a physical device. I am trying on iOS 17.x
Hi Phunction,
Based on the details provided, we have tested the reported issue with .NET 9
project against iOS version 17.3. During our investigation, we were unable to
reproduce the reported issue from our end. The ImageEditor control
is functioning as expected.
To assist you more effectively and continue our investigation, we kindly request the following details:
Syncfusion Package Version
Please ensure you're using the all Syncfusion dependent assembly are latest versions of the Syncfusion packages for .NET 9 compatibility:
Syncfusion.Maui.ImageEditor
Syncfusion.Maui.Core (Version 30.2.7 or later is required)
2. Container UsageSince Frame is obsolete on iOS, we recommend using Border, Grid, or StackLayout to avoid rendering issues.
3. Debug Mode ConfirmationKindly confirm whether the issue occurs in Debug mode.
4. Release Mode Settings (if applicable)To confirm whether trimming is the root cause of the issue, try enabling and disabling trimming by adding the following configuration to your .csproj file:
|
<PublishTrimmed>false</PublishTrimmed> |
Refer to the Note section in the Syncfusion User Guide for more details.
Add the [Preserve] attribute to prevent the linker from removing required types:
|
[Preserve(AllMembers = true)] |
Refer to the Note section in
the Syncfusion User Guide
for more details.
5. If the Issue Persists
To help us
investigate further, please share:
1.A sample
project that reproduces the issue.
2. Replication
video demonstrating the problem.
We have created a simple sample project and tested it by enabling and disabling trimming. The sample is attached for your reference. Kindly review it and let us know if you're able to replicate the issue using this project. If not, feel free to modify the sample to help us reproduce the issue.
Your input will be invaluable in helping us investigate the issue and suggest appropriate solutions. We appreciate your cooperation and look forward to your response.
Regards,
Tamilarasan G.
Attachment: MAUIImageEditorImpSample_(1)_af110b0d.zip
- 3 Replies
- 2 Participants
-
PH Phunction
- Aug 31, 2025 09:37 PM UTC
- Sep 2, 2025 01:22 PM UTC