News

.NET MAUI Reaches General Availability, Replacing Xamarin.Forms

Microsoft's evolution of Xamarin.Forms, .NET Multi-platform App UI (.NET MAUI), has finally reached General Availability status, providing one framework for both mobile apps and, now, desktop apps.

"Now you and over 5 million other .NET developers have a first-class, cross-platform UI stack targeting Android, iOS, macOS, and Windows to complement the .NET toolchain (SDK) and base class library (BCL)," Microsoft said. "You can build anything with .NET."

Announced at the company's big Build developer conference, the GA release is some six months late, as it was originally planned to debut with .NET 6 in November 2021 but "slipped the schedule." So the dev team has been playing catch up with a series of previews and three Release Candidates, the latter just shipping a couple weeks ago. Also earlier this month, we reported ".NET MAUI Finally Replaces Xamarin in Visual Studio 2022 17.3 Preview 1." So the conversion from Xamarin.Forms to .NET MAUI is basically complete. Xamarin support will continue through November 2023.

Desktop & Mobile Options in Visual Studio 2022 17.3 Preview 1
[Click on image for larger view.] Desktop & Mobile Options in Visual Studio 2022 17.3 Preview 1

".NET Multi-platform App UI (.NET MAUI), now generally available, is a new framework for building modern, multi-platform, natively compiled apps for iOS, Android, macOS and Windows using C# and XAML in a single codebase," Microsoft said. "The framework solves the challenges developers face when building native apps across many operating systems. Instead of having to learn multiple technology stacks, .NET MAUI abstracts them into one common framework built on .NET 6."

.NET MAUI promises native UI constructs that look and behave appropriately according to the underlying platform. For the brand-new Windows support, for example, .NET MAUI uses the WinUI 3 native UI components that come with the Windows App SDK (formerly Project Reunion).

As a jack-of-all-trades tool (well, except for Linux and web), .NET MAUI uses native UI via app toolkits provided by each platform, and the dev team ships workloads to create applications that exclusively target Android, Android Wear, CarPlay, iOS, macOS, and tvOS directly using the native toolkits from .NET, and the supporting libraries AndroidX, Facebook, Firebase, Google Play Services and SkiaSharp, for examples.

What's more, .NET MAUI can incorporate web components built with Microsoft's Blazor framework for creating web apps primarily with C# instead of JavaScript. .NET MAUI features the BlazorWebView control, which permits rendering Razor components into an embedded Web View. By using .NET MAUI and Blazor together (Blazor Hybrid apps with .NET MAUI), developers can reuse one set of web UI components across mobile, desktop and web. As shown in the graphic below, .NET MAUI Blazor App is now a Visual Studio 2022 project type.

.NET MAUI Options in Visual Studio 2022 17.3 Preview 1
[Click on image for larger view.] .NET MAUI Options in Visual Studio 2022 17.3 Preview 1

Also, because Blazor isn't sandboxed like JavaScript web apps, Blazor Hybrid apps allow access to native device capabilities, opening up all kinds of scenarios to work with a machine's file system and other resources, even editing local images and text. Blazor functionality is served up in an embedded Web View, so WebAssembly, the backing technology for client-side Blazor, isn't needed.

"Native apps look and feel like the operating system on which they belong by default and layouts are fully adapted to each device automatically, with no additional code," Microsoft said this week. "APIs are available directly from C# to access over 60 platform features, including isolated storage, sensors, geolocation and camera. Visual Studio 2022 includes Hot Reload technology to make developers much more productive building .NET MAUI apps. Developers can also take advantage of the latest debugging, IntelliSense and testing features of Visual Studio to write better code faster."

New Build your first app documentation is available for .NET MAUI, also detailing how to migrate from Xamarin.Forms.

As a Current release, the .NET MAUI workload is fully supported under that scheme's release schedule of 18 months, and it will be serviced at the same monthly cadence as .NET.

"For the next phase, the foundation is now established for the broader .NET ecosystem to bring plugins, libraries, and services from .NET Framework and the old project system to .NET 6 and SDK style projects," Microsoft said.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube