Categories
.NET .NET 8 .NET 9 .NET MAUI Android Blazor C# Desktop Developer F# Getting Started Hybrid iOS macOS Mobile NuGet Templates Visual Studio Web Windows Xamarin Xamarin.Forms

.NET MAUI on .NET 9

Last Tuesday, the first preview of .NET 9, an STS release, was released along with Visual Studio 2022 17.10 Preview 1.0

A detailed blog post describing the Vision for .NET 9 is here. Moving forward, preview releases will be published in the GitHub discussion and for Preview 1 here.

And what’s changed in this .NET MAUI 9 Preview 1 is here. Have a look at the tentatively planned features on .NET 9 here and Roadmap here.

.NET 9 Preview 2 is available now:

How to Install:

To try .NET MAUI 9, follow these steps:

  • First, install the latest .NET 9 Preview SDK. Download the installer from here
    • As mentioned on the SDK downloads page, .NET 9 Preview is supported on Visual Studio 2022 (v17.10 Preview 1 or later)
  • Then install .NET MAUI Workload by executing the below command
dotnet workload install maui

On Linux, only the .NET MAUI Android workload is supported for now:

dotnet workload install maui-android

Post installation, verify the .NET version and whether the MAUI workload is listed with the below commands:

dotnet --version
dotnet workload list

Templates Support:

Both the CLI package and the VS Extension of the All-in-One templates pack are already updated to support creating .NET MAUI projects on .NET 9 Preview.

To install:

dotnet new install VijayAnand.MauiTemplates

For this, have introduced an additional option to the framework parameter – net9.0 for the CLI and on the IDE, this is added to the Framework dropdown to select.

Note: The default value for this framework parameter remains as net8.0 (the current stable channel), which means to create a project for .NET 9 (the preview channel), an explicit value of net9.0 is required as shown below.

Support for this .NET 9 framework parameter option is extended to the two library projects as well.

All other parameters and their options are supported as it is. To know more about the supported options, take a look at this article.

C#:

dotnet new mauiapp -o MyApp -f net9.0
dotnet new mauiclasslib -o MyLib -f net9.0
dotnet new sharedclasslib -o MyApp.UI -f net9.0

F#:

dotnet new mauiapp -o MyApp -f net9.0 -lang F#

.NET MAUI 8 SR2:

On an additional note, the next service release (SR2) for .NET MAUI 8 (v8.0.7) is now available. Quite like SR1, this is also published as a NuGet package update and is compatible with the existing stable workload release. To seamlessly update, refer to this article. Though it’s posted for SR1, the steps are similar, and now with the version # as 8.0.7.

The templates pack is already updated with this change so that for new projects, no manual step is required.

If you find these templates and extensions useful, kindly support the work by adding your review to the VS Marketplace and also by adding a Star to the GitHub repository where it’s hosted. Also, share this article with your team, inner circle, and social media channels.

And a considerable amount of my time is spent on adding new features to the templates pack if you would like to recognize the work and sustain the momentum, kindly consider sponsoring the project in GitHub here. Thanks in advance.

Happy coding. Stay connected as we continue to learn and share the experiences from this exciting journey of being a .NET developer.

One reply on “.NET MAUI on .NET 9”

Comments are closed.