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

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

The Templates Pack has been updated for .NET MAUI 10, adding support for Visual Studio 2026 Insiders. Key features include Global Namespace support for XAML files, new CLI parameters for item creation, and a user-friendly interface.

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, both the CLI NuGet package and the Visual Studio extension of the All-in-One .NET MAUI Templates Pack have been updated.

First and foremost, adding support for the Visual Studio 2026 Insiders release.

To know more about the key features of .NET MAUI 10, consult this comprehensive overview article.

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.9 release (command samples provided below):

  • When targeting .NET MAUI 10, all XAML files in XAML-based projects will be generated using the .NET MAUI 10 Global namespace.
  • Using a concise XAML approach, local types will be mapped to the Global namespace.
    • Refer to the Imports.cs source file, in the project root folder, for XML namespace definitions.
  • All XAML Item Templates now include support for two optional parameters, as outlined below.
    • -gn | --global-namespace – Default value is false.
    • -in | --implicit-namespace – Default value is false.
    • When opted-in, the output will be generated using the .NET MAUI 10 Global or Implicit Namespace features respectively.
    • If both parameters are specified, the implicit option takes precedence.

CLI Commands:

Creating a New Page:

Here, type name would be auto-suffixed with Page for this item.

dotnet new maui-page -n Login -gn

Creating an Item with any Base type:

Here, using Popup from .NET MAUI Community Toolkit as sample.

dotnet new maui-item -n BusyPopup -b Popup -gn

It’s fully backward compatible with the XML prefix entry. If the global or implicit namespace option is opted, it will ignore the prefix. Otherwise, it will include the prefix in the output.

dotnet new maui-item -n BusyPopup -b mct:Popup -gn

Project Templates:

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.

dotnet new mauiapp -o MyApp -f net10.0
dotnet new mauiclasslib -o MyApp.UI -f net10.0
dotnet new sharedclasslib -o SharedLib -f net10.0

New Features in VS Extension:

  • The Generic Item Template dialog includes a UI control for opting Global or Implicit namespace options for ease of use. Refer to the below screenshot.
    • This article provides an introduction to the Generic Item Template and explains how to use it.
    • The Global namespace option is set as the default for .NET MAUI 10 projects.
    • Opting out is possible if needed. The output will be generated using the older namespace. This is compatible with earlier versions, also.
    • Additionally, you can select the Type Name suffix directly in the UI. Simply enter the item name, like Login, in the Add New Item dialog. Choose the suffix, like Page, from the available UI options. This will generate the Type name as LoginPage.
  • Auto type suffix for regular Item Templates (both XAML and C#) of Page, View, and Shell. This is inline with their CLI counterparts.

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.

.NET MAUI Generic Item template dialog with options for Base Type, Generic Base Type, Global Namespace, Implicit Namespace, and Item Type Suffix.
.NET MAUI Generic Item dialog

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.

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

Comments are closed.

Discover more from Developer Thoughts

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

Continue reading