MacOS Guide to Developing for .NET MAUI

Farewell Visual Studio for Mac

Since Microsoft dropped the news back in September (which used to be a month of excitement, Apple announcing new phones, iOS updates and the lead up to MS Build) announcing the retirement of Visual Studio for Mac, I've been on the hunt for a solid replacement. As a developer that has been using MacOS for 90% of my development needs for many years if felt like a kick in the guts. Just as it looked like we were finally getting some traction on multi-platform development tooling and frameworks (specifically .NET MAUI) the proverbial rug is being pulled. So I've spent the last couple of months reviewing what the development landscape looks like for MacOS.

To preface this, I've been an avid MacOS user and developer long before it was called MacOS. It used to be that I would run my Windows VM happily inside the Intel based MacBook Pro, using Visual Studio on Windows and performing all my other tasks on the Apple side.  Microsoft looked to be committed to providing tooling on Apple's platform and when the Silicon laptops were released it was a relief that core web development and cross platform tooling (Xamarin.Forms for example) were available and solid for day to day use.  I found not being able to run my traditional Windows VM on the silicon based processors was not the bottleneck I thought it would be.

When I first read the news surrounding the demise of Visual Studio for Mac I was a little worried. It was a key part of my toolkit, each day I'd be reviewing code, writing samples or playing with personal projects but my beloved daily staple is slated for the chopping block. From the comments other developers were leaving on the Microsoft post I was not alone in my disappointment. What was the alternative? most of the noise was pointing at Microsoft VS Code. 

Hello VS Code

I remember when VS Code was introduced back in 2015, at the time I thought it would be the replacement for my text editor and that's all I used it for initially. It became more widely used when I was building mobile applications via the Ionic and Cordova frameworks, though big brother Visual Studio offered a more user friendly environment for other platform development. Was it going to be possible to use VS Code as a replacement IDE for my cross platform development (namely .NET MAUI) and would it provide the fast, intuitive environment I'd become accustomed to? Enter .NET Meteor and DotRush. 

Interest piqued, I decided to dive in and see if the hype was real. Having talked to some of our developers .NET Meteor was being used internally and had been for quite some time, hardly surprising since it was actually developed by one of our .NET MAUI team. To be clear, it is not officially maintained by DevExpress, it's an open source extension, it's free, and you can contribute to us using GitHub, there is also a great blog post written by Nikita on how to boost your .NET MAUI development productivity.

.NET Meteor Extension

According to the Microsoft Marketplace page .NET Meteor "allows you to build, debug .NET apps and deploy them to devices or emulators", offering;

  • Cross Platform Developmen
  • XAML IntelliSense
  • MAUI Blazor support
  • Multiple folder support
  • F# support
  • XAML Hot Reload (in my opinion a critical feature)
  • Real-time example of debugging a .NET MAUI application

Real-time debugging a .NET MAUI App

DotRush Extension

Whilst setting up VS Code as my new go to environment, I was chatting with Nikita (the brains behind .NET Meteor) and he mentioned another extension worthy of installing... DotRush in short, a great replacement extension that handles Navigation & Refactoring;

  • Go To Definition
  • Go To Type Definition
  • Go To Implementation
  • Go To References
  • Renaming
  • Code Formatting
  • IntelliSense in Multi-Target Projects
  • Cross-Platform Error Detection
  • Multiple Project Management
  • Quick Fixes
  • Code Decompiling
  • Code Quality Analysis

The results of using these extensions with my .NET MAUI project really surprised me.  Within a few minutes I was able to open an existing project, edit code and markup with speed then build, run and debug my application.  Testing both for Android and iOS the Hot Reload worked very well, I had found a replacement for my IDE and the world was no longer going to end.

Setting up the Environment

If you haven't created .NET MAUI applications on your Mac machine yet, you need to set up the environment first: 

There is a great blog available to help you through some of the above steps. 

Take Your Application to the Next Level

Of course, you can take your application to the next level by using the DevExpress .NET MAUI UI Component Library at the time of writing this post the controls are FREE.

DevExpress .NET MAUI Templates

To create a .NET MAUI application on Mac, you can use our CLI templates as described in the following help topic: CLI Templates (Windows and MacOS) which will allow you to be up and running on your .NET MAUI journey quickly and easily. 

Other Alternatives

There are some other alternative options that will still allow you to create cross platform apps such as:

  • JetBrains Rider IDE
  • Parallels (Windows ARM on Silicon Mac)
  • Windows bare bones paired to MacOS (iOS development)

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.