MAUI is a multi-platform framework that is used to create applications in various cross-platforms from a single shared codebase. This is like an extension to the XAMARIN line up which was previously used for building applications for different platforms under the required configuration. The key extension would be from the UI side where one can perform individual Displays using graphic libraries on a single shared codebase.
There is a baseline called BCL which is elaborated as Base Class Library which is represented as common business logic to the defined user interface based on the given platform. There is a bit requirement of prerequisites for MAUI as such having touch with any visual studio version which we release as on date. This article will be sharing all the installation process for visual studio 2022.
How to install Visual Studio 2022
Step 1
This link will redirect to VS preview website and click on download.
Step 2
After the file is downloaded click on the installer file, after few updates below image will be opened. Then click on install.
Step 3
Select required frameworks as required, as discussed make sure to select .NET MAUI in the optional column and click on Install. As I already have the file it is showing as Modify.
That's it we are good to go for creating a project in VS 2022.
Creating First MAUI App
Once after downloading the Visual Studio launch the application.
Step 1
Click on create a new project and in search bar type MAUI, we will be getting some results. Click on MAUI App to create a project with a name as required.
Step 2
Click on dependencies as shown in the solution explorer, right-click, and click on manage NuGet packages, Then the solution will restore the required files required for the android.
Step 3
Android emulators required for xamarin will end up with an error. To resolve the error, click on this link.
XA5207:- Error Could do not find android.jar for API level 31.
Error XA0031 Java SDK 11.0 or above is required when using .NET 6 or higher.
dotnet workload update --no-cache --disable-parallel --from-rollback-file
That's it, we have installed Visual Studio 2022 and created an MAUI project.