Click here to Skip to main content
15,902,189 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,

Is there any way to develop a macos application on windows using c# without installation mac on virtual machine. I have read about xamarin cross platform development but it supports only ios and Android mobile application but not mac application.

Please help.
Posted
Comments
/\jmot 8-Apr-15 16:16pm    
not a question, just ask in google.
Sanjeev236 8-Apr-15 16:22pm    
Ajmot, I tried then only i got reference about xamarin and mono.But all supports ios and android not mac application development like Xcode. Anyways thanks a lot for your kind concern and sparing your valuable time.
Sergey Alexandrovich Kryukov 8-Apr-15 16:36pm    
This answer is no so simple and really deserve answering in detail. I up-voted it. Please see my answer; I am the one who really did porting of software for Mac OS X (more exactly, to multiplatform solution which should cover Mac OS X) and can tell you that Mac OS X is not so easy target. I know a lot of tricky detail on this matter. You can ask me more questions on the topic.
—SA
Sergey Alexandrovich Kryukov 8-Apr-15 16:34pm    
This is not as simple as you might think. Please see my answer.
I must admit, this question makes sense.
—SA

1 solution

The only way I used it to use Mono and develop using one of .NET languages. You can install Mono on Mac OS X. Mono is the alternative CLR implementation available for many platforms (see the links below).

You can start with development on .NET, if this is more convenient for you. Then you need to test it on Mono for Windows. Normally, if you have identical Mono settings and other identical components on Mac OS X, your code will work without recompilation. The major difference is between .NET and Mono (even on Windows), so it would be your major part of work addressing cross-platform issues.

Please see:
http://en.wikipedia.org/wiki/Mono_%28software%29[^],
http://www.mono-project.com/[^],
http://en.wikipedia.org/wiki/.NET_Framework[^],
http://en.wikipedia.org/wiki/CLR[^].

If you want behavior close to native Mac OS X behavior, you will need such a project as monobjc:
http://en.wikipedia.org/wiki/Monobjc,
http://www.monobjc.net/.

With it, development on Windows will be much more difficult. Still, you will be able to compile it on Windows, but you would not be able to use visual programming and — worst thing — could not test on Mono for Windows. You would need to do a big part of work on MonoDevelop:
http://en.wikipedia.org/wiki/MonoDevelop,
http://www.monodevelop.com,
http://en.wikipedia.org/wiki/Standard_Libraries_%28CLI%29#Base_Class_Library[^].

Even worse, you would need to do considerable part of it on MonoDevelop for Windows.

Alternatively, you can use System.Windows.Forms application (some incompatibilities apply, so use Mono for Windows for testing everything), but such applications look somewhat ugly and foreign on Mac OS X. System.Windows.Forms is not a part of BCL (see the like above) and is not standardized under EMCA standard for CLR. Please read on Mono portability: http://www.mono-project.com/docs/getting-started/application-portability[^].

[EDIT]

Probably, you can improve the level of compatibility compared to System.Windows.Forms (not 100% sure because I did not work with the very latest versions of Mono) if you use Qt or GTK+ for .NET and Mono. Both libraries can be installed on both Windows and Mac OS X and are integrated with .NET, Mono and MonoDevelop, but the use of Visual Studio is also possible.

The drawback is: you would need to have the installations of one of these libraries on both systems. Please see:
http://en.wikipedia.org/wiki/GTK%2B[^],
http://www.gtk.org/[^],
http://en.wikipedia.org/wiki/Qt_%28software%29[^],
https://qt-project.org/[^],
http://en.wikipedia.org/wiki/MonoDevelop[^],
http://monodevelop.com/[^].

Also, you may want to wait for Windows 2015 which is due in November. It promises fantastic cross-platform features, but I don't know the detail well. Please check it yourself.

[END EDIT]

Note that with Mono development for Linux you have much less problem. You can use the same applications which work on Mono for Windows in all cases.

—SA
 
Share this answer
 
v3
Comments
Sanjeev236 4-Sep-17 2:04am    
Awesome Job SA. Never been disappointed as your fan.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900