Print Page | Close Window

FlexCel on Mac

Printed From: TMS Software
Category: .NET Components
Forum Name: .NET Flexcel
Forum Discription:
Printed Date: 30 May 2020 at 4:52pm

Topic: FlexCel on Mac
Subject: FlexCel on Mac
Date Posted: 28 Jan 2016 at 9:29pm
When running a console project on a Mac in Xamarin Studio and executing:

XlsFile xls = new XlsFile(filename);

I get the error: The type initializer for 'MonoMac.Foundation.NSString' threw an exception. 

Any ideas about how to address this issue?

Posted By: Bruno Fierens
Date Posted: 28 Jan 2016 at 10:57pm



Have you called "MonoMac.AppKit.NSApplication.Init()?


From -


5.5.1. Notes.

If doing an OSX Console application, you will need to add a reference to System.Data, System.Xml and XamMac or MonoMac to the app. You might also need to copy XamMac.dll or MonoMac.dll you your output folder. And in a console application, you will need to initialize the Cocoa framework by calling MonoMac.AppKit.NSApplication.Init() (As commented in the code). For normal applications, you will probably not need to do anything.


Print Page | Close Window