We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

System.ExecutionEngineException when creating a workbook

 UTC
Hi,

I am having trouble to make my app working on my iPhone6. It seems like it's working fine on the Simulator, but not the actual iPhone, I am doing the release build instead of the debug build. 

On this line, IWorkbook workbook = excelEngine.Excel.Workbooks.Create(1);

It throws a System.ExecutionEngineException: Attempting to JIT compile method 'void Syncfusion.XlsIO.Parser.BiffRecordFactory:FillFactory ()' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.

Please help! 

6 Replies

AV Abirami Varadharajan Syncfusion Team September 17, 2019 02:20 PM UTC

Hi Mishel, 
 
Greetings from Syncfusion. 
 
When using Syncfusion.XlsIO.Portable library in iOS application, the following settings must be done to execute in iOS devices.

Visual Studio: 
In Visual Studio, we can only execute in release mode for iOS device
 by setting the link behavior field to Link SDK assemblies only.

Xamarin Studio (Recommended):   
  
Link behavior: Link SDK assemblies only (otherwise classes you need in Syncfusion.XlsIO.Portable.dll are linked away).    
       
Enable debugging: Unchecked (this is to create a smaller binary, since adding debug information makes it somewhat bigger).    
       
Applying these settings will execute the application properly in iOS device.     
You might face the following issues, if the above mentioned build options are missed out.     
You might get "Native linking error" while compiling.     
You might face runtime Exception ("System.TypeInitializationException").     
  
You can also refer to the ReadMe file for older Xamarin Studio version in the following link.  
 
If the issue still occurs at your end, please share your working version of Syncfusion assemblies along with the issue reproducing sample which will be helpful for us to validate further from our side. 
 
Regards, 
Abirami 



ML Mishel Li September 17, 2019 03:09 PM UTC

Hi Abirami,

I did all the settings and it still doesn't work. I have attached my working XlsIO assemblies and sample below. Thank you.


Attachment: Archive_588e44b9.zip


ML Mishel Li September 17, 2019 03:11 PM UTC

And this is the working sample that's producing the error.

Attachment: DateTableController.cs_bacfd485.zip


AV Abirami Varadharajan Syncfusion Team September 18, 2019 02:06 PM UTC

Hi Mishel, 
 
Thank you for updating us. 
 
We are working on reproducing the issue with shared details. We will update further details by 20th September 2019. 
 
Regards, 
Abirami 



ML Mishel Li September 18, 2019 02:53 PM UTC

Hi,

Thanks for the help. The issue is solved. I had to use an oder version of the XlsIO(version: 16.2.0.42) but event that it didn't working completely because when I download that version of the nuget packages, it downloads a different version of Syncfusion.Xamarin.Compression. So I used the packages of the working example you guys had. This definitely not the correct way of doing it, but I am not sure why the newest version doesn't work or the older version doesn't download the same version of dependencies. 


AV Abirami Varadharajan Syncfusion Team September 19, 2019 02:06 PM UTC

Hi Mishel, 

We didn’t facing any version mismatch when installing 16.2.0.42 version of ‘Syncfusion.Xamarin.XlsIO’. Assemblies (Syncfusion.XlsIO.Portable.dll,Syncfusion.Compression.Portable.dll and Syncfusion.License.dll) should be referred with same version 16.2.0.42 on successful NuGet installation.  

We request you to refer below documentation to know more on NuGet installation in detail. 


In addition to the previously shared suggestion, we request you to update Additional options setting as described in the below article. 


Kindly try this and let us know if this resolves issue in latest version from your side. 

Regards, 
Abirami 


Loader.
Live Chat Icon For mobile
Up arrow icon