Start an external process on mac with c#

后端 未结 3 445
暖寄归人
暖寄归人 2021-02-06 01:15

I\'m successfully using System.Diagnostics.Process.Start() to start my external mono executable on windows. However it fails on mac. I\'m not getting any error, simply nothing a

3条回答
  •  深忆病人
    2021-02-06 02:09

    The little known feature of Mono is that you can directly run the .exe file (to be compatible with how it is done in Windows, but also for the convenience). It is started using the same Mono VM that started the original executable. In other words one can simply do:

    Process.Start("Test.exe");
    

    Well, at least it works for me on Linux ;)

    Edit:

    Here's the source for that feature, should work on every platform.

提交回复
热议问题