18 FAQs
David Ortinau редактировал(а) эту страницу 2022-11-21 18:31:28 -06:00

What is .NET MAUI?

.NET MAUI is the Multi-platform App UI for building native cross-platform apps with .NET for Android, iOS, macOS, and Windows. It is the evolution of Xamarin.Forms, taking its place as the .NET solution for building native cross-platform apps.

When will .NET MAUI be available?

.NET MAUI is GA as of May 23rd at Microsoft Build 2022. Read the announcement for details.

Do I still need Visual Studio preview to use .NET MAUI?

Nope. .NET MAUI is available with stable Visual Studio and .NET 7.

Does .NET MAUI support XAML and MVVM?

Absolutely! You can use XAML with markup extensions, data binding, compiled bindings, visual state manager, styles, data templates, native views, and more. You can use the .NET Community Toolkit for MVVM help, or leverage a number of MVVM libraries such as Prism or FreshMVVM.

When should I upgrade my Xamarin.Forms applications to .NET MAUI?

We recommend evaluating your projects dependencies today in order to determine what is available today supporting .NET 6. Once you find that your dependencies are available and you have mitigations for anything remaining, then go ahead and upgrade! As of the May 2022 release of .NET MAUI we are already seeing many libraries and services enabling support for .NET 6, and expect to see more in the months to come.

Will my Xamarin.Forms projects automatically update to .NET MAUI?

See our migration guide here.

Does .NET MAUI allow deployment of one code base across Android, iOS, macOS, and Windows?

Yes, check out the supported platforms documentation.

What "flavor" of XAML is supported by .NET MAUI?

.NET MAUI uses the 2009 XAML specification, the same as Xamarin.Forms.

Do I have to use XAML in .NET MAUI?

Not at all, XAML is optional. Since Xamarin.Forms supported XAML Hot Reload, it has long been the most productive way to build UI. With the introduction of .NET Hot Reload in .NET 6, you can now also benefit from the same productivity when building your applications entirely in C#. For a better experience declaring UI in C#, check out the .NET MAUI Community Toolkit's Markup extensions package.

Do Xamarin NuGets (plugins) work in .NET 6 projects?

Any code that references Xamarin namespaces or types (Xamarin.iOS) needs to be updated to target .NET 6 TFMs (target framework monikers) and recompiled. Other .NET Standard libraries will work as-is.

Does .NET MAUI allow you to break out into Native UI when needed?

Yes, it leverages Multitargeting which allows you to reference platform-specific APIs in a unified .NET MAUI project

Platform Specific Libraries