Visual Studio 2022 With MAUI First Impressions

Introduction

Companies/organizations are preparing for digital transformation to boost the efficiency of their staff, products, and services in the face of changing global circumstances and dynamics. In their pursuit of transformation, a faster Go-To-Market is a critical success factor.

The advancements in handheld devices and their reliance in day to day life has created a huge demand for smart applications and also there is an increased need in delivering them as fast as possible with buttery smooth experience without compromising on key features and Xamarin forms make the obvious choice in this Arena(Flutter is still not stable and React native again a JavaScript).Xamarin forms have undergone 7+ years of development and with the latest Xamarin form 5.0, it is a stable cross-platform with jaw-dropping User interfaces and seamless integration with native features.

Considering some drawbacks with Xamarin with an existing state like having multiple platform-specific projects and dependency on complex renderers, Microsoft has created a new Platform .Net MAUI also called multi-platform app UI which aims at simplifying development by making unified project targeting .net 6 and created controls from scratch for performance.

In my previous article, we have seen the creation of the MAUI application using the command line approach. In this article, we will explore the brand new Visual studio 2022 and create a MAUI app using the .net6 framework and with help of a template.

Prerequisite

Use the MAUI-check tool to install workloads since VS2022 still not supports the workload for MAUI. Refer to my previous article for more information.

Step 1

Install the Visual studio 2022 preview version from this link and once installed update it to the latest patch.

Step 2

Open the visual studio and select the Manage extensions option from the Extensions menu as shown below,

Visual studio 2022 with MAUI first impressions

Step 3

Search for MAUI extension and click on install. Close the visual studio and wait for the extension to get installed as shown below,

Visual studio 2022 with MAUI first impressions

Step 4

In Visual Studio create a new project and select the MAUI template as shown below and follow the steps for the creation of the project.

Visual studio 2022 with MAUI first impressions

Visual studio 2022 with MAUI first impressions

Step 5

We can now see the single MAUI project created with iOS, Android, Mac catalyst in a single project structure. For now, unload the WinUi3 as we will cover that in the next article soon. Right-click the solution and click on Restore and rebuild the solution.

Visual studio 2022 with MAUI first impressions

Step 6

Connect your Android device or emulator and configure the deployment in the configuration as shown below.

Visual studio 2022 with MAUI first impressions

Step 7

Run the project by clicking on your device name on top and we will see the app loaded on the device as shown below,

Visual studio 2022 with MAUI first impressions

Step 8

Visual studio 2022 has MAUI debugging capabilities added.

Visual studio 2022 with MAUI first impressions

Step 9

Try adding a Datepicker as shown and save to Test the hot reload functionality.

Visual studio 2022 with MAUI first impressions

Conclusion

With Visual Studio 2022, we can see a fresh and clean user interface, improved hot reload and hot restart and fine grain support for creating a mobile application with simplicity eliminating boilerplate structures.


Similar Articles