How to Run an Eto Application on MacOS

Eto is a Cross platform GUI framework for desktop in C#. When running the application RegexFileSearcher built with Eto on MacOS, several issues have to be resolved to execute it.

Error 1

1
2
3
4
$ ./RegexFileSearcher.Mac 
Failed to load /Users/**/Downloads/RegexFileSearcher-osx-x64/libcoreclr.dylib, error: dlopen(/Users/**/Downloads/RegexFileSearcher-osx-x64/libcoreclr.dylib, 1): no suitable image found. Did find:
/Users/**/Downloads/RegexFileSearcher-osx-x64/libcoreclr.dylib: code signature in (/Users/**/Downloads/RegexFileSearcher-osx-x64/libcoreclr.dylib) not valid for use in process using Library Validation: library load disallowed by system policy
Segmentation fault: 11

Solution:

1
sudo xattr -d com.apple.quarantine *

Or check page https://forum.blackmagicdesign.com/viewtopic.php?f=12&t=106755.

Error 2

1
2
3
4
5
6
7
8
9
./RegexFileSearcher.Mac 
Unhandled exception. System.InvalidOperationException: Error creating instance of platform type 'Eto.Mac.Platform, Eto.Mac64'
---> System.InvalidOperationException: Platform type 'Eto.Mac.Platform, Eto.Mac64' was loaded but is not valid in the current context. E.g. Mac platforms require to be in an .app bundle to run
at Eto.Platform.Get(String platformType, Boolean allowNull, List`1 errors)
--- End of inner exception stack trace ---
at Eto.Platform.Get(String platformType, Boolean allowNull, List`1 errors)
at Eto.Forms.Application..ctor(String platformType)
at RegexFileSearcher.Mac.MainClass.Main(String[] args)
Abort trap: 6

Solution:

To run on a Mac platform, you need to bundle your app

Actually, there is a doc for running the applications with Eto.

文章目录
  1. 1. Error 1
  2. 2. Error 2
,