Tuesday, January 31, 2023

Creating MAUI APP Project And Understanding Its Folder Structure In VS 2022

 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.

Creating Your First MAUI APP Project & Understanding its Folder Structure in VS2022

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.

Creating Your First MAUI APP Project & Understanding its Folder Structure in VS2022

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.

Creating Your First MAUI APP Project & Understanding its Folder Structure in VS2022

Creating Your First MAUI APP Project & Understanding its Folder Structure in VS2022

Creating Your First MAUI APP Project & Understanding its Folder Structure in VS2022

Creating Your First MAUI APP Project & Understanding its Folder Structure in VS2022

Creating Your First MAUI APP Project & Understanding its Folder Structure in VS2022

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.

Creating Your First MAUI APP Project & Understanding its Folder Structure in VS2022

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.

No comments:

Post a Comment

How to register multiple implementations of the same interface in Asp.Net Core?

 Problem: I have services that are derived from the same interface. public interface IService { } public class ServiceA : IService { ...