Skip to content

Conversation

@mattleibow
Copy link
Member

Backport of #32251 to release/10.0.1xx

Copilot AI review requested due to automatic review settings October 29, 2025 01:15
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 re-enables previously commented-out template tests for the --sample-content option and addresses related template issues. The changes resolve integration test failures by updating warning suppressions and adding missing package dependencies.

Key changes:

  • Re-enables two --sample-content test cases that were previously disabled due to issue #32151
  • Updates warning suppression from XC0103 to NU1608 to match current CommunityToolkit.Maui issues
  • Fixes indentation inconsistencies in the template's MauiProgram.cs
  • Adds explicit Microsoft.Maui.Essentials package reference to the project template

Reviewed Changes

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

File Description
src/TestUtils/src/Microsoft.Maui.IntegrationTests/SimpleTemplateTest.cs Re-enables two test cases for --sample-content option that were previously commented out
src/Templates/src/templates/maui-mobile/MauiProgram.cs Fixes indentation (tabs vs spaces) and fully qualifies ContentPanel type namespace
src/Templates/src/templates/maui-mobile/MauiApp.1.csproj Updates warning suppression from XC0103 to NU1608 and adds explicit Microsoft.Maui.Essentials package reference
Comments suppressed due to low confidence (1)

src/TestUtils/src/Microsoft.Maui.IntegrationTests/SimpleTemplateTest.cs:49

  • The warning code and issue reference are now inconsistent with the project template. The template was updated to suppress NU1608 with reference to issue #2921, but the test still references XC0103 and issue #2205. These should be synchronized to reflect the current warning suppression approach.
				"XC0103", // https://github.com/CommunityToolkit/Maui/issues/2205


<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Maui.Essentials" Version="$(MauiVersion)" />
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

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

Adding an explicit reference to Microsoft.Maui.Essentials may be unnecessary as it's typically included transitively through Microsoft.Maui.Controls. This could create maintenance overhead if the transitive dependency relationship changes in future versions. Verify if this explicit reference is truly required or if it's being added to work around a specific issue that should be documented.

Suggested change
<PackageReference Include="Microsoft.Maui.Essentials" Version="$(MauiVersion)" />

Copilot uses AI. Check for mistakes.
@rmarinho rmarinho merged commit 0a86d2f into release/10.0.1xx Oct 29, 2025
9 of 11 checks passed
@rmarinho rmarinho deleted the dev/10-templates branch October 29, 2025 10:34
@mattleibow mattleibow changed the title Improve templates for GA [release/10.0.1xx] Improve templates for GA Oct 29, 2025
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