Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

497902

Suspended
Original poster
Sep 25, 2010
905
229
How do I make a VS2012 C# project (WinForms) compatible with OS X? Is it possible at all?
 

robvas

macrumors 68040
Mar 29, 2009
3,240
629
USA
How do I make a VS2012 C# project (WinForms) compatible with OS X? Is it possible at all?

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
 

Niklas Korz

macrumors newbie
Oct 7, 2013
3
0
Germany
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.

http://www.mono-project.com/Main_Page
 

robvas

macrumors 68040
Mar 29, 2009
3,240
629
USA
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#
 

dernhelm

macrumors 68000
May 20, 2002
1,649
137
middle earth
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:
http://www.mono-project.com/Compatibility

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.