Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

FlexCel on Mac

 Post Reply Post Reply
Author
JAMES WILSON View Drop Down
New Member
New Member
Avatar

Joined: 28 Dec 2015
Posts: 5
Post Options Post Options   Quote JAMES WILSON Quote  Post ReplyReply Direct Link To This Post Topic: FlexCel on Mac
    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?
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 8224
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 28 Jan 2016 at 10:57pm

Hi,

 

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

 

From https://components.xamarin.com/gettingstarted/flexcel

 

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.

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down