Categories
.NET .NET 10 .NET 8 .NET 9 .NET MAUI .NET MAUI 10 .NET MAUI 9 Android Aspire Blazor C# CLI 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.11

Hello Aspire. Integrate .NET MAUI 10 with Aspire for better Orchestration.

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.

This is the third set of enhancements for .NET MAUI 10. Check out the v7.9 and v7.10 articles for the feature set.

To know more about all the features of this template pack, refer to the series of articles listed here.

And to learn about key features by MAUI version, check these articles:

How to Install:

From CLI and for users on macOS and Linux:

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 Manage Extensions (shortcut: Alt+X+M) from within the Visual Studio IDE. Search with the 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

What’s New:

Aspire Integration is the key feature encompassed within this v7.11 release (command sample provided below):

This feature is exclusive to .NET MAUI 10 and does not apply to other versions.

Update: This limitation has been resolved. Upgrade to Templates Pack v7.13.0 to Integrate Aspire with earlier versions of .NET MAUI as well.

It’s recommended to consult the earlier article on Integrating .NET MAUI with Aspire for the approach used. In the template, Aspire AppHost is a project instead of a file-based program, enabling smoother integration with the IDE.

  • Introduced an option to integrate .NET MAUI with Aspire.
    • CLI parameter --aspire – Default value is false.
      • This will be an explicit option.
      • This parameter is ignored in the earlier versions and will not have any impact.
    • In the Visual Studio Project Options dialog, this will be displayed as a checkbox control. Refer to the screenshot below.
  • Opting in will generate two more projects: one for Aspire AppHost and another for Service Defaults.
  • The Aspire AppHost project will reference the .NET MAUI project, while the .NET MAUI project will reference the Service Defaults project.
  • The AddServiceDefaults() builder method will be wired up into the .NET MAUI startup pipeline within the MauiProgram.cs file.
  • The MAUI App will be added as a resource in the Aspire orchestration pipeline.
  • The launch options in the Aspire AppHost will be set up for each supported platform. This depends on the chosen MAUI target platforms, which default to All supported platforms.
    • Except for the Windows platform, all other platforms need to specify the target device.
    • For Android, it’s the AdbTarget property, while for iOS or Mac Catalyst, it’s the _DeviceName property. Fill in the placeholder.

CLI Commands:

The default value for the Framework (-f) parameter remains as .NET 9 (net9.0), the stable release. 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 --aspire

Visual Studio Project Options Dialog:

Visual Studio - Project Options Dialog - Option to Integrate .NET MAUI with Aspire
Visual Studio – Project Options Dialog – Option to Integrate .NET MAUI with Aspire

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 Sponsors 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.

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

Comments are closed.

Discover more from Developer Thoughts

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

Continue reading