Announcing .NET MAUI in .NET 8

David Ortinau

Today our team is thrilled to introduce you to the latest major stable release of .NET MAUI in .NET 8! We build .NET MAUI to enable .NET developers to create cross-platform applications for Android, iOS, macOS, and Windows with deep native integrations, platform-native user interfaces, and hybrid experiences that extend the reach of Blazor and other web UI technologies. Today marks the third major release of .NET MAUI in the past 18 months which turns the corner from our unifying of the Xamarin platform with .NET into pushing forward .NET as one.

In addition to all the amazing work in the .NET SDK and runtime, we have labored with extreme focus on .NET 8 to fix high impact bugs, isolate and resolve memory leaks, improve the accuracy and reliability of hot reload, ease the path for customers upgrading from Xamarin, retain and improve performance at startup and runtime, and so much more. We are very proud of this release and cannot wait for everyone to start using it.

“Creating Right to Left layouts in .NET MAUI is now a reality thanks to .NET 8. Visual elements are perfectly arranged and Carousels work great now. We’ve been working with the latests preview bits for a while and the improvements the MAUI team did have proven key to successfully deliver RTL apps to our clients.” – Leo, UXDivers for Umrahme

right to left comparing .net 8 and 7

Early feedback like this has been encouraging, and we are eager to hear from you next. Let’s take a look at some of the biggest improvements you’ll get in .NET MAUI.

Overall Quality

Firstly looking at the release by the numbers, in .NET 8 we have:

  • 1618 pull requests merged (up from 577)
  • 689 bug issues resolved (up from 180)

Compared to the .NET 7 GA release that’s a 180% increase in pull requests merged and 283% more bug issues resolved. Since .NET 7 was a shorter release for .NET MAUI, I thought it would be interesting to include all the .NET 7 service releases as well. Taking that into account, .NET 8 still has 18% more pull requests merged and 13% more bug issues resolved.

This would not have been possible without the 94 wonderful contributors across teams at Microsoft and especially from the community. On behalf of all .NET MAUI users we thank you so much for your continued contributions and support!

Contributors to .NET MAUI in .NET 8

Early in .NET 7 servicing we heard loud and clear from developers that we needed to raise the quality of releases, and so we did just that raising the bar on what we would backport from our .NET 8 work to release in .NET 7 until we had more automated testing in place and other processes to better guard against this. During subsequent releases we enabled a dormant suite of Xamarin.Forms tests to run on .NET and against .NET MAUI, and added more than 3500 device tests on Windows spread across the Controls, Core, and Essentials areas among other tests.

Going forward in .NET 8 servicing, the bar is back down and we will ship more bug fixes to .NET 8 than you saw in .NET 7. We know that this was not a popular decision, and we did the work to be more confident in the quality of our quick servicing releases to meet your need.

The top areas of quality improvements are:

  • Keyboard behavior, especially on mobile
  • FlowDirection support for right-to-left languages
  • Layout fidelity and performance
  • Scroll performance
  • Memory management

Visit the release notes for a complete list of fixes and improvements.

What’s new

The .NET MAUI pedigree is rooted in touch interfaces on mobile and tablet devices, so we have some work to do to enable more desktop specific experiences where user input is more often from keyboard and mouse. This release enables keyboard accelerators, enhances pointer gestures, and more.

Keyboard accelerators

A keyboard accelerator is the shortcut you can associate with any menu item in a desktop application, like copy (Ctrl+C), paste (Ctrl+V), and Cut (Ctrl+X).

<ContentPage.MenuBarItems>
    <MenuFlyoutItem Text="Cut"
                    Clicked="OnCutMenuFlyoutItemClicked">
        <MenuFlyoutItem.KeyboardAccelerators>
            <KeyboardAccelerator Modifiers="Ctrl"
                                Key="X" />
        </MenuFlyoutItem.KeyboardAccelerators>
    </MenuFlyoutItem>
</ContentPage.MenuBarItems>

desktop menu bar

For more details and advanced examples, see the Keyboard Accelerators documentation.

Pointer gesture enhancements

.NET MAUI has included a PointerGesture for a while so you knew when the cursor was over an element, and now in .NET 8 you gain PointerPressed and PointerReleased events along with event arguments containing more information about the position of the pointer. This works across Android, iPadOS, Mac Catalyst, and Windows.

See the updated Recognize a pointer gesture documentation.

Drag and drop gesture enhancements

To improve the drag and drop user experience we have exposed more APIs on Windows such as including custom glyphs when you initiate a drag, custom captions when you drag, and on iOS and Mac Catalyst for the size of the item you’re dragging, adding custom shapes or images, and customizing the drop actions to indicate if it’s a copy, a move, or a forbidden action.

 

See the updated Recognize a drag and drop gesture documentation.

Performance and memory improvements

Jonathan Peppers has written in-depth about the work in .NET 8 to improve performance, app size, and address memory leaks. New features include AndroidStripILAfterAOT, AndroidEnableMarshalMethods, and NativeAOT for iOS. These and many other improvements are available so you can choose the best path for reducing your app size and improve performance.

By staying on the leading edge of .NET, you get most of these improvements without having to make any changes to your code.

Miscellaneous highlights

With the enormous amount of work that has gone into this release, it should be no surprise that there’s even more to highlight. For the complete list of changes, enjoy a lengthy read of the .NET MAUI 8.0.3 release notes, and for an abbreviated summary enjoy reading the What’s new in .NET MAUI for .NET 8.

Get started today

.NET MAUI and .NET 8 are included in today’s stable release of Visual Studio 2022 17.8.

On all platforms, you can develop with .NET MAUI using Visual Studio Code. Install the .NET MAUI extension and let us know how we can improve this preview experience for you in the future.

Download the .NET 8 installer, and then install .NET MAUI from the command line:

dotnet workload install maui

Through the retirement of Visual Studio for Mac next year you can continue developing using Visual Studio for Mac after enabling the preview feature for .NET 8 in Preferences.

For upgrading projects to .NET 8, follow the upgrade guidance on our wiki.

Thank You

On behalf of the .NET MAUI team, thank you for all of your engagement, contributions, and support! We look forward to hearing about your successes, and your feedback on how we can improve the product through .NET 8 service releases and into .NET 9.

40 comments

Discussion is closed. Login to edit/delete existing comments.

  • Stephen Winstanley 0

    Updated to VS 17.8. Updated project to .Net 8 (easier than expected) and it all runs still.

    Have now found VS seems slow on editing some XAML files and editing some XAML files causes VS to totally crash. No idea why some crash VS and some are just slow editing.

    Another Maui joy I guess. Having to edit the files in the new flaky Notepad for now.

    • David OrtinauMicrosoft employee 0

      Please be sure to report feedback through Visual Studio after you experience a crash so we can investigate that. Glad the update was otherwise smooth.

      • Stephen Winstanley 0

        I have had time to try this a lot more now and have more comments for you.

        In general Maui is much improved now that some long overdue bug fixes have been done, it is how the initial release should have been. But there are more bugs to fix that have been waiting a long time, like this from April 2022 https://github.com/dotnet/maui/issues/6644. I do hope the bug fixing effort continues now it is started.

        Also the navigation transition between pages is very jarring on Maui going side to side, especially on older Android devices. There was a much better visual animation in Xamarin. I really think this sliding sideways animation makes Maui look so slow and clunky on older devices.

  • Stefan Hinterhegger 1

    quality is still shit! sorry to say that but it’s reality. too many inconsistency across platforms and bugs that are open for way too long. still a super frustrating experience. I wouldn’t be surprised if Microsoft dumps MAUI soon – still no dogfooding shown at .NET Conf (meanwhile Google migrated Google Earth to Flutter – not a fanboy, just sayin)

    • David OrtinauMicrosoft employee 0

      Hi Stefan, I’m sorry you’re still having that frustrating experience. I hope you’ve seen positive progress in this release compared to previous. Service releases are already in the process of rolling out with more.

      Re: no dogfooding, we have products within Azure, Dynamics, M365, and others using .NET MAUI as mentioned in our .NET Conf presentation.

  • Ravish Kumar 0

    Thanks for sharing detail, appreciate if share the latest sample code links to the examples given in the article

  • Daite Dve 0

    Inconvenient truth is MAUI will never be “production ready” due to “alienness” to Android platform. If you need high quality app on Android – use Kotlin & Android Studio. And forget that clumsy idea “multiplatform” – it doesn’t exist.

    • David OrtinauMicrosoft employee 0

      If you don’t need multiplatform but still want to leverage .NET, you can absolutely do that. .NET for Android is the underlying binding to Android SDK that MAUI builds upon, and you can use it directly.

      dotnet new android is 1:1 with Android platform and even adds C# idioms in many places to feel more natural. If it’s the alienness of MAUI compared to Android, then this is the path you might feel more aligned to.

  • Odhiambo Stallone 0

    Hello David, i wanted to know if fluent ui can be used with dotnet maui for desktop and android apps

  • Damian 1

    Just completed our MAUI upgrade from .NET 7 to .NET 8, super-charging it with Prism.Maui, and couldn’t be more pleased! Sure, there were some minor bumps along the way as you would expect with any package upgrade, but they were all quickly solvable. Absolutely enjoying this new experience.

    Thank you, MAUI Team and Prism Library team!!

Feedback usabilla icon