Open ismlsmile opened 7 years ago
The exception is "Platform instance is null. Have you created your application?" in "Eto.Platform.get_Instance"
This is probably because when you are using auto-detection, it cannot load the appropriate DLL as it does it dynamically. I'm not sure what you'll have to do to get around this, but most likely you'll have to create the particular platform class manually.. for example:
Platform platform;
if (EtoEnvironment.Platform.IsWindows)
platform = new Eto.Wpf.Platform();
else if (EtoEnvironment.Platform.IsMac)
platform = new Eto.Mac.Platform();
else if (EtoEnvironment.Platform.IsLinux)
platform = new Eto.Gtk.Platform();
else
throw new Exception("Could not detect platform");
new Application(platform).Run(new MainForm());
I'm not sure if this will work 100% as it may have problems referencing each platform.
Hope this helps! Curtis.
Thanks for your reply, I tried but it could not work, the exception changes to:
Current operation is valid only when the underlying type on a XamlType is known, but it is unknown for '{http://schema.picoe.ca/eto.forms}Label'
I'm having the same problem, however I use only Eto.Wpf.
For this I use il-repack. There are few problems:
I resolved this issue by using dnlib Here is the hack: MyModulePatcher.csx
Script is run by using RoslynPad
I hope this will help someone. There might be more issues, but for me these changes were enough.
I'm not sure if the problem is with eto.forms or ilmerge. When I use ilmerge to merge Eto*.dll into the exe file, the merge is ok, but when I run the output exe, it just crashes.