.NET MAUI Release Candidate 2 – With 100% More Tizen

David Ortinau

We are excited to release .NET Multi-platform App UI (.NET MAUI) Release Candidate 2. This release is covered by a “go-live” support policy, meaning .NET MAUI is supported by Microsoft for your production apps. The team has been focused on stabilizing the toolkit, resolving the high impact issues you have been helping us to identify through your valuable feedback. Thank you!

Get Started Today

To acquire .NET MAUI RC2 on Windows, install or update Visual Studio 2022 Preview to version 17.2 Preview 5. In the installer, confirm .NET MAUI (preview) is checked under the “Mobile Development with .NET” workload.

To use .NET MAUI RC2 on Mac, follow the command-line instructions on the wiki. Support for .NET MAUI in Visual Studio 2022 for Mac will ship formally in a future preview.

Release Candidate 2 release notes are on GitHub. For additional information about getting started with .NET MAUI, refer to our documentation and the migration tip sheet for a list of changes to adopt when upgrading projects.

Reminder about Xamarin support The Xamarin Support Policy is still in effect, which covers those products for 2 years after initial release. The last release was in November of 2021, so support will continue through November 2023.

Adding Tizen Platform

Tizen.NET has long enabled .NET applications to run on millions of Samsung TVs, phones, and other devices running Tizen. Today, Tizen joins Android, iOS, macOS, and Windows as one of the target platforms you can reach with .NET MAUI. Congratulations to the Samsung Tizen.NET team on this great milestone!

Visit the Tizen .NET introduction to get started. While the platform support is part of .NET MAUI SDK and we’ve added the scaffolding for Tizen to the .NET MAUI template project, the required workload dependencies are distributed through a separate installation experience maintained by Tizen.

Looking for samples? The Tizen team keeps up to date with all our beautiful sample apps to make sure they run great on Tizen mobile and Tizen TV.

The official Tizen Emulator supporting .NET 6 will be released by the Tizen team soon.

HelloMaui

Tizen emulator

Source

WeatherTwentyOne

Tizen TV emulator running WeatherTwentyOne

Source

.NET Podcast

Tizen emulator and browser running dot net podcasts, .NET MAUI Release Candidate 2

Tizen TV emulator running dot net podcasts

Source

Getting the most from platforms

.NET MAUI excels at giving you the same UI and styling for native controls across all supported platforms, while also giving you broad access to native platform features all from a single .NET language. .NET does this by taking full advantage of multi-targeting to organize code and resources that may span several platforms from a single project.

There may also be scenarios in your applications where you’ll want to customize how it looks and behaves on a specific platform in order to take full advantage of native features only present on that platform, or to unify an experience to be more consistent with other platforms. There are 3 main ways in which you can do this in .NET MAUI:

1. Platform folders

Within the single project structure, we’ve paved the way for you to put platform-specific code and files into folders by platform. The build tasks for .NET MAUI are pre-configured to know that anything you place there will apply only to that platform.

Solution shows platform folders, .NET MAUI Release Candidate 2

2. Filename convention

The .NET MAUI build tasks will also look at filename conventions to determine what code should run for each platform. The source code is actually setup this way as well. The Button handlers suffix the filenames by platform: Android, iOS, Tizen, and Windows.

Button handler files by platform

3. Conditional compilation

Multi-targeting also works via conditional compilation arguments. By using #if, you can segment code per platform from anywhere in your project. For example, in the WeatherTwentyOne app’s MauiProgram.cs, we configure services for local notifications and the system tray, which are very platform-specific APIs.

    var services = builder.Services;
#if WINDOWS
    services.AddSingleton<ITrayService, WinUI.TrayService>();
    services.AddSingleton<INotificationService, WinUI.NotificationService>();
#elif MACCATALYST
    services.AddSingleton<ITrayService, MacCatalyst.TrayService>();
    services.AddSingleton<INotificationService, MacCatalyst.NotificationService>();
#endif
    services.AddSingleton<HomeViewModel>();
    services.AddSingleton<HomePage>();

By default, the following options are available to you:

  • ANDROID
  • IOS
  • MACCATALYST
  • TIZEN
  • WINDOWS

You’ll notice IntelliSense will additionally offer you more specific options to target each platform such as “WINDOWS10_0_17763_0_OR_GREATER” in case you need it.

For additional information on writing platform-specific code, check out the .NET MAUI documentation:

.NET MAUI provides other helpful strategies for adapting your applications to different platforms, screen sizes, idioms, and more. For example, you can leverage these markup extensions and strategies:

  • OnPlatformWidthRequest="{OnPlatform 250, iOS=200, Android=300}"
  • OnIdiomWidthRequest="{OnIdiom 100, Phone=200, Tablet=300, Desktop=400}"
  • Triggers – Property, Data, Event, Multi-triggers, EnterActions, ExitActions, and State

We need your feedback

Install the latest preview of Visual Studio 2022 for Windows (17.2 Preview 5) following our simple guide and build your first multi-platform application today.

We’d love to hear from you! As you encounter any issues, file a report on GitHub at dotnet/maui.

57 comments

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

  • TSX 0

    any plans to support VB ?

    • David OrtinauMicrosoft employee 0

      No, we prioritize our language support based on customer demand which leads with C#.

  • hamid 0

    Hi David
    Thank you for improvements. But in my opinion there are still many bugs related to RIGHTTOLEFT layout , for example Radiobutton, SWIPEVIEW.
    My request is to add full support and compatibility for RIGHTTOLEFT cultures.
    thanks again .

    • David OrtinauMicrosoft employee 0

      We are working through the backlog of filed issues and those are certainly represented on GitHub. If you see specific cases that are not, please file issues.

  • hamid 0

    Hello.
    After update to Version 17.2.0 Preview 5.0, the MAUI item is missing from New Project menu.
    dotnet sdks:
    5.0.100 [C:\Program Files\dotnet\sdk]
    6.0.100-preview.3.21202.5 [C:\Program Files\dotnet\sdk]
    6.0.100-rc.1.21458.32 [C:\Program Files\dotnet\sdk]
    6.0.100 [C:\Program Files\dotnet\sdk]
    6.0.200-preview.22055.15 [C:\Program Files\dotnet\sdk]
    6.0.300-preview.22204.3 [C:\Program Files\dotnet\sdk]
    7.0.100-preview.3.22179.4 [C:\Program Files\dotnet\sdk]
    Thank you.

  • Charles Roddie 0

    Is the single-project structure required or optional? It seems to me to add complexity as when doing platform-specific things other platform code is there as well, and to add the potential for MAUI-single project bugs compared to individual platform heads will tend to be very stable.

    • David OrtinauMicrosoft employee 0

      It’s optional. I haven’t yet noticed a spike in issues related to single-project vs platform heads.

  • Jean-Benoît MARCHAL 0

    I really appreciate the evolutions offered by MAUI.
    I see a real opportunity for the community to produce components that could benefit everyone.

  • Erik Gassler 0

    Greetings,

    I am developing a Maui Blazor hybrid app and one of the features in this app is the ability to create and run PowerShell scripts. This was the first feature I added to this app a little over a month ago and until now it has been working fine. However, after the latest RC2 Preview update I noticed some of my scripts are now failing citing a lack of permissions.

    Trying to investigate why this happened and searching for any way to fix it has led me to a couple of questions.

    1.) Are there any plans to support publishing as native Windows desktop apps – not UWP? I’m working on a developer tool and it’s important that it not be constrained by the constraints provided to UWP apps. I need to be able to either require my app run with Admin privileges or allow users to enable it as an option.
    2.) Are there any configuration options I can currently set that would allow me to run my app with Admin privileges?

    • Daniel RothMicrosoft employee 0

      Hi Erik. Can you share the specific permissions error that you are seeing? .NET MAUI apps running on Windows are fully desktop apps, not UWP apps. .NET MAUI uses WinUI 3 on Windows.

  • Gordon Moore 0

    I really wish the images and documentation were checked before you announced things. A simple example is that the image of the solution explorer does not reflect what I see with creating a new blank app. I have shell stuff. This means that documentation l look at is meaningless to me. Its all very well for those in the know, but for noobs it is highly frustrating that I cant get anywhere. Also as an example of crap documentation look at https://docs.microsoft.com/en-us/dotnet/maui/ It discusses cats and dogs, but it is only part of the code, doesn’t explain how to create anything and where are the resources and even a solution to look at? Surely there should be a github repo?

    Anyway I cant be bothered wasting my life so Im off to give Flutter a go. Pity, I had high hopes.

    • Daniel RothMicrosoft employee 0

      Thanks for sharing this feedback, Gordon. The .NET MAUI documentation is admittedly still a work in progress with a lot of reliance still on the earlier Xamarin content. We’re working on getting the content updated and expanded so that the experience is friendlier to new users.

    • Bryan Cass 0

      I found the same issue, Gordon. I want to use the new software, but being new to mobile development I’m going to need some help. I just wrote a post on this thread about volunteering to help with the tutorial or documentation. Maybe it would help to have a newbie to the product give some input on what would be helpful.

  • Klaas Troost 0

    It is a pitty that my windows maui project does not compile anymore since RC2. There are more people with the same problem. It would be nice when this can be fixed as soon as possible.

    The problem is described at: https://github.com/dotnet/maui/issues/6529. Please help me out.

  • stanley broo 0

    MAUI love it, finally back to something that feels like .NET development. Remember when WPF came with all its tools, it was heaven ..then came Azure …,silverlight died, Windows Mobile died ..and to the rescue Xamarin
    It’s been frustrating years with Xamarin to say the least.

    Now it feels like we’re on the right path again. Love it.

    Good Job!!!!!!! Now just waiting for PRISM to catch up.

  • Dave Calkins 0

    I’m curious about the support status for this. The post says, “This release is covered by a “go-live” support policy, meaning .NET MAUI is supported by Microsoft for your production apps.”. However, to get it, you need to “install or update Visual Studio 2022 Preview to version 17.2 Preview 5”.

    On a recent MS support incident, they told me they could not provide support for any “preview” version of Visual Studio. In that case I was using the VS 2022 Preview for Mac, but their issue was that it was a “preview” version. So I wonder if this would be a problem using support incidents?

Feedback usabilla icon