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.

33 comments

Leave a comment

      • David OrtinauMicrosoft employee 0

        I hear you Jake! It’s on my radar. I am watching these other projects to learn what goes well, what gets adoption, and where we might be able to add our unique support to the community.

    • wei wei 0

      I’m also looking forward to MobileBlazorBindings

  • Inntec Chile 0

    Why are there no comments?
    Net 8 was published yesterday and I see no interest….

    • Schmidt, Helmut 2

      Honestly: What am I still supposed to comment? 😅

      These blog posts follow a cycle.
      David posts how many bugs they squashed and how many PullRequests they merged.
      -> I update to the latest & greatest version: Build errors, Regressions, Glitches
      -> The regressions in particular make me dread each new PullRequest :/
      -> Especially layout controls & CollectionView are a cesspool of regressions: You never know if this is the intended behavior now or if you’re dealing with a new regression

      David asks for issues we have and that we send them to him personally
      -> Then nothing for weeks, months… maybe years? You never know if a ticket closes because you mentioned it or not?
      -> It’s certainly a good way of feigning interest and faking progress.

      Sometimes they present a showcase from a partner (barely ever anything internally from Microsoft)
      -> Never any source code (That’s a given, I know…)
      -> No mention how many 3rd party frameworks, Custom renderers, Workarounds, etc. were needed

      Just look back at some previous Maui blog posts. It has become tiring and nobody from Microsoft is ever bothering to answer the unpleasant questions.

      Despite my backlash I’m actually fan of what Maui stands for. I would really love to see it work. The ever returning errors, lies about its current state (“production ready” my ass!) and constantly understaffed team have rendered me very jaded, though :/

      We use to tell a joke in our team: “Every other Microsoft project has Project Managers. Unfortunately Maui only got Propaganda Managers.”

    • Wally McClure 0

      I decided to start a .net 8 project, copy files over, and I am back up and running again. It wasn’t a huge killer time sink, just hoping that someone might know something.

    • John Hollander 0

      I’ve occasionally had to delete the obj and bin directories and then call “dotnet restore” in the command line in the project directory to get it to run properly after an upgrade.

  • Alexander Russkov (DevExpress) 1

    Gratitude to the .NET MAUI team! We at DevExpress work with .NET MAUI a lot and see positive trends in platform stability. It’s exciting to witness our clients seamlessly launch their .NET MAUI applications, transitioning from Xamarin and native platforms to embrace modern technologies and reduce development costs. We firmly believe in the strength of the community collaboration, and I can’t resist sharing the blog post about new controls and features available in our free .NET MAUI control suite 🙂 DevExpress .NET MAUI What’s New (beta).

    We’re currently in beta, but I invite everyone to explore the blog post to discover the controls and features that could enhance their mobile apps.

  • Vincent Wang 0

    This blog talked about performance gain on .Net 8 ,
    By staying on the leading edge of .NET, you get most of these improvements without having to make any changes to your code.

    but what I noticed is performance is getting worse for MAUI app. Here is the proof:

    1. Create two projects using the standard MAUI template, one targets .Net 7 and another one target .Net 8.
    2. Close all apps, make sure start both from cold start.
    3. Measure the delay from the .Net splash screen to the Hello World main screen. The .Net 8 one is about 1 second slower.

    I am pretty disappointed about this performance drawback on startup. Any explanation?

    • David OrtinauMicrosoft employee 0

      Would need a lot more information about your test and methodology to have a reasonable conversation about that and determine the explanation. I’d be happy to connect you with Jonathan Peppers or another engineer to look into it. Email me if you’re interested in doing that: david.ortinau@microsoft.com

      • Vincent Wang 0

        Hi David,

        Thanks for the response. I don’t have any formal methodology here. I just noticed that the startup is about 1 second slower from splash screen to the main screen with Net 8 comparing to Net 7. The project I used was the Hello World created from MAUI template, no other code has been added. The test was done on Galaxy S8(kind of a bit old one, company phone currently running our internal app built with Xamarin Form). I’m not sure if you can notice the 1 second difference on a faster phone.

        • George Karabin 0

          Out of curiosity, was this test using a debug build deployed from Visual Studio or a release build launched from the OS?

          • Vincent Wang 0

            Debug build, deployed to the device with Visual Studio. After that, the test is done by launching the app directly on the device.

          • George Karabin 0

            Tried to reply to Vincent, but there is no reply button on his post. In my experience debug builds do load more slowly with .NET 8 (on my app) than 7. I don’t notice a drop off in Release builds, but need to do more performance testing to see what we do or don’t gain. I would definitely like to see some attention given to app load speed in debug builds.

  • was was 1

    I am just completely baffled with the fact that most important is connectivity to devices with your mobile phone. Yet for some reason, .Net MAUI bluetooth is no where in sight.

    • David OrtinauMicrosoft employee 0

      You can you Bluetooth with MAUI and make it even easier with libraries that specialize in it. Changing this approach isn’t something we are investing in since it works well for many companies today.

  • wei wei 0

    There are too few controls in Maui, and it would be perfect if it could be compatible with WinUI controls

    • David OrtinauMicrosoft employee 0

      You can use WinUI controls with MAUI on Windows. You also have a wide array of controls from component vendors and the open source community. And you can even use Blazor components mixed with MAUI. You have many many options to explore.

  • Simas Paškauskas 0

    Updated to new version. It seems to reintroduce the https://github.com/dotnet/maui/issues/9011 bug. Will test few more times, create the issue and probably downgrade to preview version where it was fixed until it is fixed again…

  • Seyyid Ciftci 0

    It seems that an error has occurred in the presentation of the example for RTL. The picture shows the burial site of the Prophet Muhammad (s.a.v.), but underneath it describes the location of Mecca. This of course hurts the 1.9 billion members of the Muslim community worldwide as our holy sites are not even properly differentiated.
    I ask the team to revise.

  • George Karabin 1

    Our team’s port to .NET 7 is largely complete at this point, and our update to .NET 8 previews is looking good as well. We’re looking forward to cutting over to 8 before releasing.

    Many kudos to your extended team for helping us with Android DEBUG build performance issues that cropped up during our .NET 8 effort. With a few pointers on how to be effective with Speedscope and dotnet trace we identified some unusual slow code that worked fine in older releases, but for whatever reason slowed down in .NET 8. The nice thing is that even though release builds are fine for us now, we are set up well to get more headroom based on the profiling data.

Feedback usabilla icon