Introduction

Completed

.NET MAUI is a multi-platform framework for creating native desktop and mobile apps with C# and XAML (Extensible Application Markup Language). Using .NET MAUI (Multi-platform Application User Interface), you can design mobile apps that can run on Windows, Android, iOS, iPadOS, and macOS.

Suppose you work for a national/regional grocery store chain. The chain wants to expand their loyalty program with a mobile and desktop app. The new app allows one-touch dialing to the store, and also pushes notifications about special offers when the user is at the store. The app therefore needs access to some hardware features.

You're tasked with identifying the technology and building a proof-of-concept. You identify .NET MAUI as a likely technology choice. .NET MAUI enables you to reuse the same application code and markup for creating a user interface (UI), and easily access hardware and platform-specific features like the phone dialer and location services. Additionally, with .NET MAUI you can make use of the C# skills of the developers you already work with.

Learning objectives

In this module, you will:

  • Learn the basic architecture of .NET MAUI.
  • Create a .NET MAUI app.
  • Define a shared UI for the platforms supported by .NET MAUI.
  • Deploy a .NET MAUI app from Visual Studio.
  • Access platform APIs using .NET MAUI.

Prerequisites

  • Visual Studio 2022 with the .NET MAUI workload installed
  • Optional: Visual Studio Code with the .NET MAUI Extension and .NET SDK with the .NET MAUI workload installed
  • Familiarity with C# and .NET

Requirements for .NET MAUI development

To create .NET MAUI apps with .NET 9, you need to install Visual Studio version 17.12 or newer with the following workload installed:

  • .NET Multi-Platform App UI development

Additionally, if you want to build .NET MAUI Blazor apps, you must install the ASP.NET and web development workload.

See the documentation for a walkthrough of setup.

Development with Visual Studio Code

If you're developing on macOS or Linux, you'll need to install Visual Studio Code and the .NET MAUI Extension along with the .NET SDK and .NET MAUI Workload. See the documentation for a walkthrough of setup.