Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 18, 2025

The documentation incorrectly showed builder.Services.AddServiceDefaults() when configuring service defaults in a .NET MAUI app with Aspire integration.

Change

  • Fixed method call from builder.Services.AddServiceDefaults() to builder.AddServiceDefaults() in docs/data-cloud/aspire-integration.md (line 191)

Context

AddServiceDefaults() is an extension method on MauiAppBuilder, not on IServiceCollection. The corrected syntax matches the maui-samples implementation.

Before:

// Add service defaults
builder.Services.AddServiceDefaults();

After:

// Add service defaults
builder.AddServiceDefaults();
Original prompt

This section details on the original issue you should resolve

<issue_title>builder.Services.AddServiceDefaults() should be builder.AddServiceDefaults()</issue_title>
<issue_description>Original taken from https://learn.microsoft.com/en-us/dotnet/maui/data-cloud/aspire-integration?view=net-maui-10.0

 // Add service defaults
builder.Services.AddServiceDefaults();

It should be:

builder.AddServiceDefaults();

taken from https://github.com/dotnet/maui-samples/blob/9bed4b8109be745e12a3ae690be2f2ced9577bdf/10.0/WebServices/MauiAspire/SampleMauiApp/MauiProgram.cs#L21</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Internal previews

📄 File 🔗 Preview link
docs/data-cloud/aspire-integration.md docs/data-cloud/aspire-integration

@learn-build-service-prod
Copy link

Learn Build status updates of commit f8b7a85:

✅ Validation status: passed

For more details, please refer to the build report.

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
@learn-build-service-prod
Copy link

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link

Learn Build status updates of commit f36599b:

✅ Validation status: passed

File Status Preview URL Details
docs/data-cloud/aspire-integration.md ✅Succeeded View (>=net-maui-8.0)

For more details, please refer to the build report.

@learn-build-service-prod
Copy link

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link

Learn Build status updates of commit f36599b:

✅ Validation status: passed

File Status Preview URL Details
docs/data-cloud/aspire-integration.md ✅Succeeded View (>=net-maui-8.0)

For more details, please refer to the build report.

Copilot AI changed the title [WIP] Fix builder.Services.AddServiceDefaults() usage Fix incorrect AddServiceDefaults() method call in Aspire integration docs Nov 18, 2025
Copilot AI requested a review from jfversluis November 18, 2025 19:10
Copilot finished work on behalf of jfversluis November 18, 2025 19:10
@jfversluis jfversluis marked this pull request as ready for review November 19, 2025 10:26
@jfversluis jfversluis requested a review from a team as a code owner November 19, 2025 10:26
@learn-build-service-prod
Copy link

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link

Learn Build status updates of commit 1f95187:

✅ Validation status: passed

File Status Preview URL Details
docs/data-cloud/aspire-integration.md ✅Succeeded View (>=net-maui-8.0)

For more details, please refer to the build report.

@PureWeen PureWeen merged commit 6c2d243 into main Nov 19, 2025
6 checks passed
@PureWeen PureWeen deleted the copilot/fix-add-service-defaults branch November 19, 2025 13:01
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.

builder.Services.AddServiceDefaults() should be builder.AddServiceDefaults()

3 participants