Skip to content

Fix CI pipeline build warnings (RS0016/RS0017, XA1006, duplicate splash, XAML)#34629

Open
rmarinho wants to merge 1 commit intomainfrom
Fix-warnings
Open

Fix CI pipeline build warnings (RS0016/RS0017, XA1006, duplicate splash, XAML)#34629
rmarinho wants to merge 1 commit intomainfrom
Fix-warnings

Conversation

@rmarinho
Copy link
Copy Markdown
Member

Description

Fixes ~97 build warnings that appear on every PR pipeline run (visible in the CI build logs for Build Microsoft.Maui.sln steps).

Changes

  • RS0016/RS0017 (81 warnings): PublicAPI.Unshipped.txt entries in Essentials.AI were missing the [MAUIAI0001] prefix required by the assembly-level [Experimental("MAUIAI0001")] attribute. Added prefix to all entries in net-ios, net-maccatalyst, net-macos.
  • Duplicate MauiSplashScreen (6 warnings): Essentials.AI.Sample.csproj had two MauiSplashScreen entries (same SVG, different colors). Removed duplicate.
  • XA1006/XA4211 (4 warnings): GraphicsTester.Android AndroidManifest.xml had targetSdkVersion=31 but TFM targets API 36. Updated to 36.
  • XAML property element (6 warnings): TwoPaneViewPage.xaml had BackgroundColor attribute on property element Pane1 (invalid, ignored at runtime). Moved to child Frame.

Not addressed (intentional/external)

  • XC0022/XC0023/XC0045/XC0618/MAUIG2045 (125 warnings) - Intentional in Controls.Xaml.UnitTests test project (configured via WarningsNotAsErrors)
  • MSB3021/3026/3027 - Transient file-locking during parallel CI builds
  • XA0141 - Third-party NuGet (Gee.External.Capstone) 16KB page alignment warning in benchmarks

- Fix RS0016/RS0017: Add [MAUIAI0001] prefix to PublicAPI.Unshipped.txt
  entries in Essentials.AI project (net-ios, net-maccatalyst, net-macos)
  to match assembly-level [Experimental] attribute (fixes 81 warnings)
- Fix duplicate MauiSplashScreen in Essentials.AI.Sample.csproj
  (fixes 6 warnings across TFMs)
- Fix XA1006/XA4211: Update GraphicsTester.Android targetSdkVersion
  from 31 to 36 to match TFM API level (fixes 4 warnings)
- Fix XAML warning in TwoPaneViewPage.xaml: Move BackgroundColor
  attribute from property element to child Frame (fixes 6 warnings)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 24, 2026 23:36
@github-actions
Copy link
Copy Markdown
Contributor

🚀 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/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34629

Or

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

Copy link
Copy Markdown
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

Reduces recurring CI build warnings across MAUI solution builds by aligning platform metadata (Android manifest), fixing invalid XAML, and correcting PublicAPI analyzer expectations for an experimental assembly.

Changes:

  • Add the [MAUIAI0001] experimental diagnostic prefix to Essentials.AI PublicAPI unshipped entries for Apple TFMs to resolve RS0016/RS0017 warnings.
  • Update GraphicsTester.Android manifest targetSdkVersion to match the repo’s current default Android API level and eliminate XA1006/XA4211 warnings.
  • Fix invalid XAML usage in TwoPaneViewPage.xaml and remove a duplicate splash screen item from the Essentials.AI sample project.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Graphics/samples/GraphicsTester.Android/Properties/AndroidManifest.xml Updates targetSdkVersion to match current Android API level and stop related Android build warnings.
src/Controls/samples/Controls.Sample/Pages/Others/TwoPaneViewPage.xaml Corrects invalid property-element attribute usage by moving BackgroundColor to a valid element.
src/AI/src/Essentials.AI/PublicAPI/net-macos/PublicAPI.Unshipped.txt Prefixes unshipped APIs with the experimental diagnostic ID to satisfy PublicAPI analyzers.
src/AI/src/Essentials.AI/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt Same experimental prefix fix for MacCatalyst PublicAPI entries.
src/AI/src/Essentials.AI/PublicAPI/net-ios/PublicAPI.Unshipped.txt Same experimental prefix fix for iOS PublicAPI entries.
src/AI/samples/Essentials.AI.Sample/Essentials.AI.Sample.csproj Removes a duplicate MauiSplashScreen item that was causing warnings.

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.

2 participants