How to develop MAUI app with VS Code

How to develop MAUI app with VS Code

Introduction

Towards the end of the summer, Microsoft made the decision to retire a software that I use daily at home: Visual Studio for Mac. You can find more information here and here.

Let’s just say it was not good news for me, Visual Studio for Mac is not comparable to the Windows version but it does its job well,  I can manage dotnet projects and app development with MAUI.

Micrsoft proposed the following alternatives to Visual Studio for Mac:

  • Visual Studio Code with the new C# Dev Kit and related extensions: The recently announced C# Dev Kit.NET MAUI, and Unity Extensions for VS Code are available.
  • Visual Studio IDE running on Windows in a VM on Mac: This option will cover the broadest IDE needs such as legacy project support for Xamarin, F#, and remote development experiences on iOS by using a virtual machine (VM).
  • Visual Studio IDE running on Windows in a VM in the Cloud: Visual Studio continues to be the premier tool of choice for .NET/C# development.
  • I add to the list a very good solution JetBrains Rider, a cross-platform .NET IDE based on the IntelliJ platform and ReSharper.

I use VS Code a lot in frontend development and consider it a light and efficient tool that is perfectly integrated with all Microsoft services. So in this article I will show you how to set up VS Code for mobile application development using MAUI.

Installing C# Dev Kit for Visual Studio Code

  • Find extensions to install using the Extensions view.
  • Search and Install C# Dev Kit from the VS Code Extension Marketplace. I suggest you use the Pre Release Version, it works well and I have not found any bugs.
  • Please read the notes regarding licences in the context of individuals and organisations.

Article content


Installing .NET MAUI extension for VS Code

  • Find extensions to install using the Extensions view.
  • Search and Install .NET MAUI from the VS Code Extension Marketplace. As above, use the Pre Release Version since the product is in preview.

Article content

Create a .NET MAUI App Project

  • Create a .NET Project using the Explorer view.
  • In the Solution view you can developer your app.
  • Select your debug target by hovering over the curly braces {} next to C# or XAML in the status bar, then hit F5!

Article content
Article content


🥳 Congratulations you have just created your first MAUI app with VS Code. You can run and debug it.

There are limitations of course, one of the most important being that XAML and .NET Hot Reload are not yet supported. This should not be a problem to start using VS Code on a personal level, in the business environment I can only recommend switching to Rider for now.

If you think your friends/network would find this useful, please share it with them. I’d really appreciate it.

Thanks for reading!


Feel free to explore more of my articles on my blog www.ottorinobruni.com for additional insights. Your feedback and comments are always welcome!

To view or add a comment, sign in

More articles by Ottorino B.

  • What is Microsoft Blazor framework?

    What is Microsoft Blazor framework? Introduction As a fullstack Microsoft developer, my professional journey has…

  • How to Modify Variable Values in Xcode Debugger

    Let’s face it, having a bunch of solid tests is usually the best way to keep your code in check. But, there are those…

  • Review of NDepend: A Swiss army knife for .NET developers

    Some time ago, I had the privilege of being contacted by Patrick Smacchia, CEO and lead developer at NDepend to try out…

  • Dependency Inversion Principle (DIP) in C#

    In my previous articles I wrote about Solid Principles in C#. In this article, I am going to show you when and how to…

  • Interface Segregation Principle (ISP) in C#

    In my previous articles I wrote about Solid Principles in C#. In this article, I am going to show you when and how to…

  • Liskov Substitution Principle (LSP) in C#

    In my previous articles I wrote about Solid Principles in C#. In this article, I am going to show you when and how to…

  • Open Closed Principle (OCP) in C#

    In my previous articles I wrote about Solid Principles in C# and the Single Responsibility Principle. In this article…

    1 Comment
  • Single Responsibility Principle (SRP) in C#

    In my previous article I wrote about what they are and why to use Solid Principles in C#. In this article, I am going…

  • Solid Principles in C# - Introduction

    It's time to talk about a topic that every developer should know to work better regardless of the language or framework…

  • Type Conversion in C#

    The process of converting one type to another is called type conversion. In C#, you can perform the following kinds of…

Others also viewed

Explore content categories