Featured Article

.NET MAUI Tutorial Visual Studio Code Step by Step Guide

Kenneth Jul 13, 2026

Embarking on your .NET MAUI journey with Visual Studio Code? You're at the perfect starting point! .NET MAUI (Multi-platform App UI), previously known as .NET 6 MAUI, is a unified framework for building native-like apps on Windows, iOS, and Android. And Visual Studio Code (VSCode), a highly customizable open-source code editor, is your ideal companion for this venture. Let's dive into this exciting tutorial.

Introducing .NET MAUI - One Codebase, Many Platforms - .NET Blog
Introducing .NET MAUI - One Codebase, Many Platforms - .NET Blog

Before we begin, ensure you have the latest stable release of .NET SDK, along with Visual Studio Code installed on your machine. If not, head over to the official downloads: https://dotnet.microsoft.com/download and https://code.visualstudio.com/download, and install them.

.NET MAUI Controls Samples App - Telerik UI for .NET MAUI
.NET MAUI Controls Samples App - Telerik UI for .NET MAUI

Setting Up Your Development Environment

With installations complete, let's configure VSCode for .NET MAUI development.

.NET MAUI Course for Beginners – Create Cross-Platform Apps with C#
.NET MAUI Course for Beginners – Create Cross-Platform Apps with C#

First, open VSCode, then install the C# extension by Microsoft. This extension provides essential functionality like IntelliSense, debugging, and code navigation for C# projects. You can find it in the VSCode Extensions view (access it via View > Extensions or press Ctrl + Shift + X). Search for 'C#' and click Install.

Creating a New .NET MAUI Project

.NET MAUI Overview - Telerik UI for .NET MAUI
.NET MAUI Overview - Telerik UI for .NET MAUI

Now, let's create a new .NET MAUI project. Open a terminal in VSCode (View > Terminal or press Ctrl + `), then type:

```bash dotnet new maui -n MauiApp1 cd MauiApp1 ```

This command creates a new .NET MAUI project named 'MauiApp1'. The 'cd' command changes the directory to this newly created project.

Running the .NET MAUI App

GPA Calculator App in .NET MAUI – Complete Tutorial in Pashtointroductorychapter6
GPA Calculator App in .NET MAUI – Complete Tutorial in Pashtointroductorychapter6

Start your new .NET MAUI app by running the following command in the terminal:

```bash dotnet run ```

This command builds and runs your app on asimulator/emulator or on a physical device. Your app should open, displaying its default interface. If it doesn't, ensure your Android/iOS simulator/emulator is running.

Exploring .NET MAUI Features

How to Install Visual Studio Code on Windows PC & Laptop
How to Install Visual Studio Code on Windows PC & Laptop

With your app running, let's explore some key .NET MAUI features. We'll modify the default interface to demonstrate these features.

Open the 'MainPage.xaml' file in VSCode. This file defines the main page of your app. Here, you'll find the structure of your UI, including labels, buttons, and other controls defined using Extensible Application Markup Language (XAML).

Visual Studio Code Extensions ( 12 Best VScode Extensions)
Visual Studio Code Extensions ( 12 Best VScode Extensions)
Boost Coding Productivity 🚀
Boost Coding Productivity 🚀
Visual Studio Code tips and tricks
Visual Studio Code tips and tricks
the qr code for an anime character
the qr code for an anime character
Html
Html
VS Code Shortcuts
VS Code Shortcuts
an anime character with long hair and brown eyes is shown in three different pictures, one has
an anime character with long hair and brown eyes is shown in three different pictures, one has
the morse code is being used to learn how to use it in this video game
the morse code is being used to learn how to use it in this video game
MoCode Tutorial
MoCode Tutorial

Using Layouts

.NET MAUI offers various layouts to organize UI elements. For instance, the 'VerticalStackLayout' arranges its children vertically. To use it, replace the existing 'ContentPage' definition with the following:

```xml ```

Marshal your imagination to create intuitive and responsive UIs!

Binding App States

.NET MAUI enables you to bind app states to UI elements, reducing coding effort. To demonstrate, add a new C# property to the 'MainPage.xaml.cs' file:

```csharp public partial class MainPage : ContentPage { public MainPage() { InitializeComponent(); Greeting = "Hello, .NET MAUI!"; } public string Greeting { get; set; } ... ```

Then, in 'MainPage.xaml', bind this property to a 'Label':

```xml

Now, change the 'Greeting' property in code-behind, and observe your UI updating in real-time!

Embracing .NET MAUI in Visual Studio Code opens a world of possibilities. From here, you can delve into more advanced topics like custom renderers, platform-specific code, and advanced layout techniques. Keep exploring, and enjoy your coding journey!