Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Unhandled Exception:
System.Exception: Could not create an native instance of the type 'MonoMac.Foundation.NSUserNotification': the native class hasn't been loaded.
It is possible to ignore this condition by setting Class.ThrowOnInitFailure to false.
at MonoMac.Foundation.NSObject.InitializeObject (bool) [0x00047] in /Users/builder/data/lanes/xamcore-lion-master/1470d605/source/xamcore/monomac/src/Foundation/NSObject.cs:47
at MonoMac.Foundation.NSObject..ctor (MonoMac.Foundation.NSObjectFlag) [0x0000e] in /Users/builder/data/lanes/xamcore-lion-master/1470d605/source/xamcore/maccore/src/Foundation/NSObject2.cs:77
at MonoMac.Foundation.NSUserNotification..ctor () [0x00000] in /Users/builder/data/lanes/xamcore-lion-master/1470d605/source/xamcore/monomac/src/Foundation/NSUserNotification.g.cs:117
at UserNotificationExample.MainWindow.NotifyMeAction (MonoMac.AppKit.NSButton) [0x00000] in /Users/nischal/Desktop/mac-samples-master/UserNotificationExample/UserNotificationExample/MainWindow.cs:35
at (wrapper dynamic-method) object.[UserNotificationExample.MainWindow.Void NotifyMeAction(MonoMac.AppKit.NSButton)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.AppKit.NSButton) <IL 0x00011, 0x0004b>
at (wrapper native-to-managed) object.[UserNotificationExample.MainWindow.Void NotifyMeAction(MonoMac.AppKit.NSButton)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.AppKit.NSButton) <IL 0x0006c, 0x00213>
at (wrapper managed-to-native) MonoMac.AppKit.NSApplication.NSApplicationMain (int,string[]) <0x00003>
at MonoMac.AppKit.NSApplication.Main (string[]) [0x0003d] in /Users/builder/data/lanes/xamcore-lion-master/1470d605/source/xamcore/monomac/src/AppKit/NSApplication.cs:98
at UserNotificationExample.MainClass.Main (string[]) [0x00005] in /Users/nischal/Desktop/mac-samples-master/UserNotificationExample/UserNotificationExample/Main.cs:14
[ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: Could not create an native instance of the type 'MonoMac.Foundation.NSUserNotification': the native class hasn't been loaded.
It is possible to ignore this condition by setting Class.ThrowOnInitFailure to false.
at MonoMac.Foundation.NSObject.InitializeObject (bool) [0x00047] in /Users/builder/data/lanes/xamcore-lion-master/1470d605/source/xamcore/monomac/src/Foundation/NSObject.cs:47
at MonoMac.Foundation.NSObject..ctor (MonoMac.Foundation.NSObjectFlag) [0x0000e] in /Users/builder/data/lanes/xamcore-lion-master/1470d605/source/xamcore/maccore/src/Foundation/NSObject2.cs:77
at MonoMac.Foundation.NSUserNotification..ctor () [0x00000] in /Users/builder/data/lanes/xamcore-lion-master/1470d605/source/xamcore/monomac/src/Foundation/NSUserNotification.g.cs:117
at UserNotificationExample.MainWindow.NotifyMeAction (MonoMac.AppKit.NSButton) [0x00000] in /Users/nischal/Desktop/mac-samples-master/UserNotificationExample/UserNotificationExample/MainWindow.cs:35
at (wrapper dynamic-method) object.[UserNotificationExample.MainWindow.Void NotifyMeAction(MonoMac.AppKit.NSButton)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.AppKit.NSButton) <IL 0x00011, 0x0004b>
at (wrapper native-to-managed) object.[UserNotificationExample.MainWindow.Void NotifyMeAction(MonoMac.AppKit.NSButton)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.AppKit.NSButton) <IL 0x0006c, 0x00213>
at (wrapper managed-to-native) MonoMac.AppKit.NSApplication.NSApplicationMain (int,string[]) <0x00003>
at MonoMac.AppKit.NSApplication.Main (string[]) [0x0003d] in /Users/builder/data/lanes/xamcore-lion-master/1470d605/source/xamcore/monomac/src/AppKit/NSApplication.cs:98
at UserNotificationExample.MainClass.Main (string[]) [0x00005] in /Users/nischal/Desktop/mac-samples-master/UserNotificationExample/UserNotificationExample/Main.cs:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment