Many people often asked me on how to develop the application using c# language on a Mac machine (and other Linux based system).

This might sound a little strange for some users that are new to this, and the reason behind this is that .NET project is a close source that’s only available for the Windows platform. Rest assured though as recently they have released .NET core which is a smaller set of .NET and is a fully open source that is supported in all platforms.

Microsoft .NET Homepage
Microsoft .NET Homepage

But then before we have the open sourced .NET core, we can already develop c# program in Mac using Project Mono which is open source and cross-platform.

Getting Started

To get started with the discussion, how can code c# on Mac and other (non-windows) platform? The simple answer is to download the .NET core and install it on your machine and when you want to run it, compile it first using the .NET core.

This can be cumbersome though, as we have to keep on compiling the codes before running the program. A better solution is to use an Integrated Development Environment (IDE) which is the same as a regular Text Editor with additional tools that are ready out of the box when you installed it.

.NET Core Homepage
.NET Core Homepage

MonoDevelop

Before Microsoft released .NET core to the public, we can use MonoDevelop IDE which is a free and open source. This IDE has many great features that can help us run in no time. Below are some of the feature that it provides out of the box.

MonoDevelop Homepage
MonoDevelop Homepage

Visual Studio for Mac

Now with the .NET core open to the public, Microsoft has made another Visual Studio IDE which is called Visual Studio for Mac which almost have the same functionality as Visual Studio for Windows. You can get the Community edition for free and try it out on your own from their website.

Currently (at the time of writing this), it’s still in preview and not all features are available for use.

Visual Studio For Mac Homepage
Visual Studio For Mac Homepage

Xamarin

But then you might want also want to try Xamarin IDE as it also supports c# language and has nice integration with cross-platform. This IDE is almost the same as Visual Studio for Mac, it’s just that the Visual Studio for Mac is still in preview mode and haven’t fully completed (at the time of this writing).

Xamarin Homepage
Xamarin Homepage

Something Lighter

If you want something lighter, you can try Visual Studio Code and it’s just a regular text editor that’s open sourced by Microsoft. This text editor is blazing fast and it can edit any types of file including c#.

VS Code Homepage
VS Code Homepage

You can download this text editor from the website and in addition to that, you might want to add Omnisharp extension to the application. This extension will “enable a great .NET experience in YOUR editor of choice” and it’s free.

Conclusion

There are many great tools out there that can help you to develop c# application. You just have to look for it and try the tool to see if it work best for your application.

.NET core is still new and there will be other great IDE’s and text editor out there in the near future, so make sure to keep on exploring. You might also want to check out Rider IDE by JetBrains that will be ready in the near future (in the time of writing this, it’s still in early build).