[release/10.0.1xx] Improve templates for GA#32255
Conversation
There was a problem hiding this comment.
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-contenttest cases that were previously disabled due to issue #32151 - Updates warning suppression from
XC0103toNU1608to match current CommunityToolkit.Maui issues - Fixes indentation inconsistencies in the template's MauiProgram.cs
- Adds explicit
Microsoft.Maui.Essentialspackage 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
NU1608with reference to issue #2921, but the test still referencesXC0103and 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)" /> |
There was a problem hiding this comment.
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.
| <PackageReference Include="Microsoft.Maui.Essentials" Version="$(MauiVersion)" /> |
Backport of #32251 to release/10.0.1xx