Microsoft Replaces Xamarin Toolkits with New .NET MAUI Alternatives

As Xamarin.Forms morphs into the new .NET MAUI offering, Microsoft is replacing Xamarin toolkits with .NET MAUI alternatives.

The open source .NET Multi-platform App UI (MAUI) is a cross-platform framework for creating native mobile and desktop apps with C# and XAML, described by Microsoft as the evolution of Xamarin.Forms. Key to that evolution is the addition of desktop development support in addition to support for traditional iOS and Android mobile apps.

The company is unifying the entire .NET ecosystem into one offering with .NET 6, due to debut in November. In preparation for that, it's providing alternative .NET MAUI toolkit replacements for traditional Xamarin toolkits. The latter include Xamarin.Essentials, which provides developers with cross-platform APIs for mobile apps, and Xamarin Community Toolkit, which includes commonly found behaviors, converters, effects, MVVM utilities and controls including the CameraView, AvatarView and TabView.

[Click on image for larger view.] .NET MAUI (source: Microsoft).

".NET MAUI is the future of Xamarin.Forms and .NET MAUI Essentials is the future of Xamarin.Essentials," Microsoft said in a recent blog post. ".NET MAUI Essentials is part of the .NET MAUI GitHub repo and has been under active development to seamlessly transition to .NET MAUI."

With the recent release of .NET MAUI Preview 6 (part of .NET 6 Preview 6) the Essentials bits were directly integrated into .NET MAUI.

"When you create a new .NET MAUI application, it will use the new .NET MAUI workload and you will see <UseMaui>true</UseMaui> in the .csproj," Microsoft said. "With this enabled all of .NET MAUI Essentials comes into your project! All you need to do is add using Microsoft.Maui.Essentials; and all of the APIs you know and love are at your fingertips.

"We know that there are developers today that will be updating their existing Xamarin.iOS and Xamarin.Android apps to .NET 6 without .NET MAUI and still want to leverage all of the APIs in Xamarin.Essentials. We have you covered as well as you can add <UsingMauiEssentials>true</UsingMauiEssentials> to your .NET 6 iOS and Android apps to bring in all of the latest APIs."

With the sunsetting of Xamarin.Essentials, it will continue to be serviced through November 2022, but new features and APIs will only be added to .NET MAUI Essentials going forward. Under the new plan, Microsoft last week announced Xamarin.Essentials 1.7, focusing on critical bug fixes but also enhancing the Web Authenticator API, which adds authentication to apps and integrates with many providers using a server backend powered by ASP.NET Core. Specifically, the v1.7 release notes say, the team "Added ability to clear login information on iOS with PrefersEphemeralWebBrowserSession on the new WebAuthenticatorOptions class."

Xamarin Community Toolkit
[Click on image for larger view.] Xamarin Community Toolkit(source: Microsoft).

Also getting sunsetted is the Xamarin Community Toolkit, Microsoft announced earlier this month, being replaced by a .NET MAUI Community Toolkit that is backwards compatible and comes in two NuGet packages, CommunityToolkit.Maui and CommunityToolkit.Maui.Markup, that are scheduled for previews next month.

"Like the Xamarin Community Toolkit, the .NET MAUI Community Toolkit is fully open source and community supported!" Microsoft said. "We are currently working on porting the features from Xamarin Community Toolkit to the .NET MAUI Community Toolkit, and encourage you to continue helping us out." Developers can do so by going to the respective CommunityToolkit.Maui and CommunityToolkit.Maui.Markup GitHub repos.

More guidance on Microsoft's plans for .NET MAUI can be found in the roadmap.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


Subscribe on YouTube