Separate names with a comma.
Discussion in 'Mac Programming' started by Sven11, Sep 27, 2013.
How do I make a VS2012 C# project (WinForms) compatible with OS X? Is it possible at all?
Re-write it? Or use something like Mono?
It's way, way easier to port a program that you designed to be portable in the first place, instead of trying to port a completed project over
You should probably check out Mono and MonoDevelop. It even has the possibility to put your program into an OS X App bundle.
If you want to put it on the App Store, make sure to include the Mono runtime.
Maybe you should consider writing a separate OS X UI. You can still use C# for this, thanks to MonoMac.
If your UI is abstracted enough from the core of the program you might be able to just make a new UI.
That assumes the core of your program is all C/C++ and no C#
A few days ago I came across Xamarin.
You can check that out.
You're probably looking at a rewrite.
Mono is OK - but only supports a subset of the .Net libraries, so unless you built your C# project with mono compatibility in mind, you'll still have some porting to do, anyway.
Here's a page describing the subset of libraries mono supports:
If you wanted mono compatibility on Linux or OS/X, you'll probably also want to make sure you are compiling wih /clr : pure.
All that said, though, depending on the code base, I'd probably just port it to C++ or Objective-C. It'll give you the best native performance on OS/X and you'll get a change to rethink the code as well. Of course, from a time perspective, this is the most expensive option.