I've packaged my first MonoMac application! Hurrah!
I used the resulting .pkg to install the app on a test system, opened it....and nothing happend. I checked Console.app and saw the following in there:
8/15/11 9:16:22 PM [0x0-0xe86e86].net.johnluetke.MyApp[31629] Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
8/15/11 9:16:22 PM [0x0-0xe86e86].net.johnluetke.MyApp[31629] at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)
8/15/11 9:16:22 PM [0x0-0xe86e86].net.johnluetke.MyApp[31629] at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
8/15/11 9:16:22 PM [0x0-0xe86e86].net.johnluetke.MyApp[31629] at MonoMac.ObjCRuntime.Runtime.RegisterAssembly (System.Reflection.Assembly a) [0x00000] in <filename unknown>:0
8/15/11 9:16:22 PM [0x0-0xe86e86].net.johnluetke.MyApp[31629] at MonoMac.AppKit.NSApplication.Init () [0x00000] in <filename unknown>:0
8/15/11 9:16:22 PM [0x0-0xe86e86].net.johnluetke.MyApp[31629] at MyApp.UI.OSX.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
8/15/11 9:16:22 PM com.apple.launchd.peruser.501[668] ([0x0-0xe86e86].net.johnluetke.MyApp[31629]) Exited with exit code: 1
The NSApplication
class seems to have a run-time bug. I'm seeing the same behavior whether I run the application bundle from a test system, without Mono installed, or my dev system, with Mono installed, but when I run the app from a bundle that does not have Mono included, it works just fine.
The same behavior persists:
- without linking any assemblies
- if I skip creating a .pkg, and just test with an .app bundle with Mono included.
I'm using MD 2.6-rc2, Mono 2.10.5, and MonoMac 2.6.0.61