Setting up a new .NET MAUI project
We can create a new .NET MAUI project using Visual Studio or the command line.
Creating a new project using Visual Studio
To create a new .NET MAUI project, follow these steps:
- Launch Visual Studio 2022 and select Create a new project on the startup screen. This will open the Create a new project wizard.
In the top-middle section of the screen, there is a search box. We can type Maui
in the search box, and .NET MAUI-related project templates will be shown (see Figure 2.2):
Figure 2.2: New project setup – Create a new project
There are three templates for the .NET MAUI app or library:
- .NET MAUI App – This is for a XAML-based .NET MAUI app.
- .NET MAUI Blazor App – This template can be used to create a .NET MAUI Blazor app.
- .NET MAUI Class Library – This is the option to build a .NET MAUI class library. We can build shared components as a .NET MAUI class library...