Categories
.NET .NET 10 .NET 8 .NET 9 .NET MAUI .NET MAUI 10 .NET MAUI 9 Android Blazor C# Desktop Developer Extensions F# General Getting Started Hybrid iOS macOS Mobile NuGet Templates Tools Visual Studio VS Code VS2022 VS2026 Web What's New What's New Windows Xamarin Xamarin.Forms XAML

What’s New in the All-in-One .NET MAUI Templates Pack v7.10

As the name suggests, has a slew of features under the hood to work with .NET MAUI.

To effectively support the RC release (with Go-Live support) of .NET MAUI 10 and the latest stable release of .NET MAUI 9, both the CLI NuGet package and the Visual Studio extension of the All-in-One .NET MAUI Templates Pack have been updated.

To learn about key features by version, check these articles:

To know more about all the features of this template pack, consult the articles linked here.

How to Install:

From CLI:

Here’s the command to install the CLI templates pack.

dotnet new install VijayAnand.MauiTemplates

For users on VS2022 and VS2026 Insiders:

  • To install as VSIX, download and install from Visual Studio Marketplace
  • From within the IDE, open Extension Manager (shortcut: Alt+X+M) from within the Visual Studio IDE. Search with maui keyword. Make sure the Online/Browse Tab is in focus. Then look for .NET MAUI Project and Item Templates.
.NET MAUI Project and Item Templates logo with a purple box design, featuring project templates and code snippets for Visual Studio 2022 and 2026 Insiders.
.NET MAUI Project and Item Templates – Visual Studio Extension

Key Features:

The following delineates the key features encompassed within this v7.10 release (command samples provided below):

This is the second set of enhancements for .NET MAUI 10. It’s recommended to consult this article for the first set.

  • Support for the Implicit Namespace option in the app project template when targeting .NET MAUI 10.
  • Instead of the Global Namespace as the only option, it is now the default for .NET MAUI 10. Nonetheless, to make a smooth migration and test backward compatibility, opting out is still possible.
  • To accommodate them, two optional parameters are being added, akin to the XAML item templates.
    • -gn | --global-namespace – Default value is true.
    • -in | --implicit-namespace – Default value is false.
    • When opted in, the output will use the .NET MAUI 10 Global or Implicit Namespace feature throughout the app.
    • If both parameters are specified, the Implicit option takes precedence.
    • In the Visual Studio Project Options dialog, they are displayed as checkbox controls. Refer to the screenshot below.
    • Since both are framework dependent, opting for these parameters in the earlier version (.NET MAUI 8/9) will not have any impact. No need to even uncheck in the IDE as they’re ignored.
  • The MauiVersion can now be shown on any page, thanks to its refactoring into a control template.
    • Included as a global resource, identified by the Key VersionTemplate, it can be applied with the code snippet below.
    • ControlTemplate="{StaticResource VersionTemplate}"
  • The app project template is revised to use the Integrated App Hosting Builder Method for unified startup. Refer to the linked article for details.
    • builder.UseMauiApp<App, MainWindow, MainPage>()
  • For the app project targeting .NET MAUI 9 or later, the Tall TitleBar is configured.
    • To turn it off, comment out or remove the TitleBar section in the MainWindow definition.
    • Alternatively, update the MainWindow type to the prebuilt Window type in the unified app startup within MauiProgram.cs.

CLI Commands:

The default value for the Framework (-f) parameter still remains as .NET 9 (net9.0). It will be updated to .NET 10 (net10.0) when it reaches GA. Until such time, an explicit framework parameter is needed to create .NET MAUI 10 projects. In the UI, this will be a dropdown choice.

Implicit Namespace:

dotnet new mauiapp -o MyApp -in -f net10.0

Note: When using the Implicit Namespace option, the output is generated with the XAML 2009 Spec namespace. It utilizes the x prefix. While it’s technically not required, it becomes invalid XML when working with XAML formatting tools if it’s omitted.

Global Namespace:

Since it’s the default, there’s no need to explicitly specify the parameter.

dotnet new mauiapp -o MyApp -f net10.0

Without Global Namespace:

  • Set it to false in the CLI
  • Uncheck the option in the IDE
dotnet new mauiapp -o MyApp -gn:false -f net10.0

Visual Studio Project Options Dialog:

The Visual Studio Project Options dialog highlights the Global and Implicit Namespace option.
Visual Studio – Project Options Dialog – Global and Implicit Namespace Option

Tall TitleBar:

A .NET MAUI app configured with a Tall TitleBar for desktop, providing the look and feel of a Store app.
.NET MAUI App – Tall TitleBar

Help and Support:

Documentation is available here. If you have any issues or features to suggest, please raise an issue with appropriate details here. Ideas are most welcome.

If you find these extensions useful, kindly support the work by adding your review to the VS Marketplace. Please also add a Star to the GitHub repository where it’s actively maintained. Also, share the word with your team and inner circle.

Much of my time is spent on adding new features to the templates pack. If you would like to recognize the work, kindly consider sponsoring on the GitHub Sponsor page. This will help sustain the momentum. You can also support by buying me a coffee on the Buy Me a Coffee page. 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.

2 replies on “What’s New in the All-in-One .NET MAUI Templates Pack v7.10”

Comments are closed.

Discover more from Developer Thoughts

Subscribe now to keep reading and get access to the full archive.

Continue reading