Using Mono to port a C# .NET app to OS X?

前端 未结 4 758
旧时难觅i
旧时难觅i 2021-02-19 13:16

Alrighty guys, I\'m writing an application that I want to be cross-platform. Up until recently I\'ve been trying to do this in Silverlight with C# because it also runs on OS X,

4条回答
  •  南方客
    南方客 (楼主)
    2021-02-19 13:45

    There are several things you should keep in mind.

    1. you'll have to port any usage of platform depedendent UI code
    2. don't use platform dependentent OS calls (win32 api)
    3. don't use "exotic" libraries (like workflow, sadly ef)
    4. In general: abstract dependencies to such code away, so you can easily replace them with mono-specific libraries. (an adviseable pattern would be MVVM).

    There is a tool called MoMA that will help you with all that. However, take the results with a grain of salt. In any case, just try it.

提交回复
热议问题