Skip to content

Conversation

@jfversluis
Copy link
Member

Moving over the MAUI specific service defaults from the .NET MAUI repository to here.

I think it makes more sense to keep them here so that changes in these templates are also automatically caught, instead of trying to keep it in sync over 2 repositories.

I did keep the short name the same as it is in the MAUI repo right now. That is maui-aspire-servicedefaults as opposed to aspire-maui-servicedefaults which probably makes more sense. This to make sure there's not a breaking change for people that might be using this right now, although its still early days and preview so if you have strong opinions I'm happy to change it around.

@jfversluis jfversluis requested a review from radical as a code owner November 17, 2025 14:51
Copilot AI review requested due to automatic review settings November 17, 2025 14:51
@jfversluis jfversluis requested a review from eerhardt as a code owner November 17, 2025 14:51
@github-actions
Copy link
Contributor

github-actions bot commented Nov 17, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 13001

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 13001"

Copilot finished reviewing on behalf of jfversluis November 17, 2025 14:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the .NET MAUI-specific Service Defaults template from the MAUI repository to the Aspire repository. The template provides a service defaults implementation tailored for MAUI applications, including OpenTelemetry instrumentation, service discovery, and resilience handlers specifically configured for mobile scenarios.

Key Changes

  • Adds a new maui-aspire-servicedefaults project template with MAUI-specific service defaults
  • Implements OpenTelemetry providers initialization via IMauiInitializeService for MAUI applications
  • Includes test coverage for the new template with Aspire version 13.0
  • Updates CODEOWNERS to assign ownership to the MAUI maintainer

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Aspire.ProjectTemplates/templates/aspire-maui-servicedefaults/.template.config/template.json Template configuration defining the MAUI service defaults template with version 13.0 support
src/Aspire.ProjectTemplates/templates/aspire-maui-servicedefaults/13.0/MauiAspire.ServiceDefaults1.csproj Project file with MAUI-specific package references and OpenTelemetry dependencies
src/Aspire.ProjectTemplates/templates/aspire-maui-servicedefaults/13.0/Extensions.cs Service defaults implementation with MAUI-specific OpenTelemetry initialization
src/Aspire.ProjectTemplates/templates/aspire-maui-servicedefaults/.template.config/localize/templatestrings.en.json Localization strings for the template
src/Aspire.ProjectTemplates/templates/aspire-maui-servicedefaults/.template.config/ide.host.json IDE integration configuration for Visual Studio
src/Aspire.ProjectTemplates/templates/aspire-maui-servicedefaults/.template.config/dotnetcli.host.json CLI configuration for command-line usage
src/Aspire.ProjectTemplates/templates/aspire-maui-servicedefaults/.template.config/ide/AspireServiceDefaults.ico Template icon file
tests/Aspire.Templates.Tests/NewUpAndBuildSupportProjectTemplatesTests.cs Test class to verify the template can be instantiated and built
.github/CODEOWNERS Assigns ownership of the MAUI service defaults template

jfversluis and others added 2 commits November 17, 2025 16:18
…lts/13.0/Extensions.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jfversluis jfversluis marked this pull request as draft November 17, 2025 16:07
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Core" Version="10.0.0" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this version stay up to date?

Comment on lines +80 to +82
services.GetService<MeterProvider>();
services.GetService<TracerProvider>();
services.GetService<LoggerProvider>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of odd IMO. We need to ensure these services are activated? It almost feels like this requires a comment, or should be in fixed elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants