2 Building a .NET MAUI app

 

This chapter covers

  • An introduction to Visual Studio for macOS and Windows and the .NET CLI
  • Creating a cross-platform mobile and desktop app with .NET MAUI
  • Running a .NET MAUI app and seeing changes in real time with Hot Reload

I work with .NET developers all day, every day. Most are full-stack developers and work with a web UI framework like Angular or React. But I often hear them say things like “I don’t know mobile development” or “I don’t know native desktop development.” This is a misconception and couldn’t be further from the truth.

Any .NET developer can build mobile or desktop UI apps with .NET MAUI. There’s a small learning curve to get to grips with some of the UI- and markup-specific syntax and the design patterns—and that’s what this book is for. Anyone with experience with a web UI framework (especially Angular) should feel very comfortable working in .NET MAUI, although prior experience is not necessary for this book. In this chapter, we see just how easy it is for .NET developers to get started building mobile and desktop UI apps with .NET MAUI.

2.1 Saying “Aloha, World!” with .NET MAUI

In this section, we build our first .NET MAUI App: Aloha, World! We look at the tools and templates available to developers for building .NET MAUI apps and talk about some of the pros and cons of each approach.

2.1.1 Visual Studio 2022

2.1.2 .NET CLI overview

2.1.3 .NET CLI in action

2.2 Running and debugging your app

2.2.1 Visual Studio for Windows

2.2.2 Visual Studio for Mac

2.2.3 .NET CLI

2.3 Anatomy of a .NET MAUI app

2.4 Seeing real-time changes with Hot Reload

2.4.1 Visual Studio for Windows

2.4.2 Visual Studio for Mac

Summary