Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello everbody,

Is there any alternative to visual studio, that makes it possible to write program in visual studio as Mac OS ? I would like to write codes to make windows forms applications!

I know that I can make a VM and run a windows 7 or higher opn it and then run a VS to work, I am looking for a standalone program.

Can Xamarin Studio help?

regards
AM

What I have tried:

I have tried to work with Xamarin, but it seems it has not enough options as Visual studio!
Posted
Updated 19-May-16 6:57am

You can do it if you install Mono, the alternative CLR implementation, on Mac OS X: Mono (software) — Wikipedia, the free encyclopedia[^].

Mono supports .NET BCL and part of non-standard .NET FCL, and it includes System.Windows.Forms. Then you can develop the applications on either Windows, or MAC. On Windows, you can use .NET or Mono, Visual Studio, or SharpDevelop, or MonoDevelop IDE. On Mac, you can use MonoDevelop. In all cases you can use the same assemblies for .NET, Mono for Windows, or Mono for Mac, without recompilation. However, you will face some incompatibilities.

One nice way to do development on Windows would be developing and testing everything on .NET and then testing it for Mono for Windows, and, in case of incompatibilities, fix them and test on Mono again. This way, you can do essential inner development cycle on Windows only. If some code works well on Mono for Windows, additional problems with Mono for other platforms are much less likely.

See also:
SharpDevelop — Wikipedia, the free encyclopedia[^],
SharpDevelop @ic#code[^],
MonoDevelop — Wikipedia, the free encyclopedia[^],
MonoDevelop | MonoDevelop[^].

Now, more problems: Mono is good for many platforms, but Apple platforms is notoriously hostile to the "foreigners". Even when you successfully develop correctly working Windows Forms application, it will look foreign on Mac; in particular, you will see that the standard Mac menu on top of the desktop is shown as always, but is unrelated to your application, which may have it's own main menu, like in "normal" Windows Forms applications.

Can you develop Mono applications to behave natively on Mac. Yes, but they won't be compatible with Windows. To develop such native interface, you can use another product, Monobjc:
Monobjc — Wikipedia, the free encyclopedia[^],
Monobjc[^].

It's usage is much trickier for a Windows developer; you should better understand native Mac development at least a little; and it would be good to understand Objective-C, at least the basic ideas: Objective-C — Wikipedia, the free encyclopedia[^].

This may be beyond your question, but I want to mentioned another, pretty exotic possibility: I experimented with Mono development on Mac and tried out the following unusual application architecture: I managed to create two separate UI threads, one running System.Windows.Forms.Application, and another one Mac OS X API application. Roughly speaking, one operates main System.Windows.Forms.Form, and another one the main Mac-style menu, and some cross-thread code provides collaboration between the two.

—SA
 
Share this answer
 
v2
Well...all you really need is a text editor and a C# compiler...but it's hard work!
There is a version of VS that works on Macs natively: Visual Studio Code[^] - but AFAIK that only supports ASP and Cloud apps, not WinForms.
I'm really not sure it's a good idea, compared with the PC or Windows-in-a-VM, simply because you are going to need one or the other of those to test you code as your write it anyway! And as for debugging...you pretty much want VS running anyway. :laugh:
Me? I'd stick with a PC (they aren't expensive compared to a Mac) and a copy of VS Community edition (licence permitting) or go the VM route - it'll be a lot simpler and easier to debug.
 
Share this answer
 

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