Skip to content

[Android] Remove obsolete XA4218 workaround - #37941

Merged
kubaflo merged 2 commits into
inflight/currentfrom
jfversluis-validate-xa4218-workaround
Aug 29, 2026
Merged

kubaflo merged 2 commits into
inflight/currentfrom
jfversluis-validate-xa4218-workaround

Conversation

@jfversluis

Copy link
Copy Markdown
Member

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description

Removes the obsolete Android workaround that added XA4218 to MSBuildWarningsAsMessages from the Microsoft.Maui.Core build-transitive targets.

The workaround referenced dotnet/android#6809. That issue was fixed by dotnet/android#9085 in July 2024: optional missing <uses-library android:required="false"> entries no longer emit XA4218, while required missing libraries still correctly warn.

The current repository targets .NET 10 and Android API 36, well after the upstream fix.

Validation

  • Packed Microsoft.Maui.Core, Microsoft.Maui.Essentials, and Microsoft.Maui.Graphics for net10.0-android36.0 after the removal.
  • Referenced the locally packed Microsoft.Maui.Core package from a minimal Android app.
  • Confirmed the packaged Microsoft.Maui.Core.After.targets no longer adds XA4218 to MSBuildWarningsAsMessages.
  • Confirmed a missing optional androidx.window.sidecar library builds with -warnaserror with 0 warnings and 0 errors.
  • Confirmed the same missing library with android:required="true" emits XA4218, proving the Android manifest task executes and preserves the intended warning for required libraries.

Issues Fixed

Relates to dotnet/android#6809.

PureWeen and others added 2 commits August 27, 2026 23:46
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Updates the pinned `@microsoft/vally-cli` version used by skill
validation and live soak workflows from 0.12.0 to the latest stable
release, 0.14.0.

Also updates direct lint command examples and makes eval-spec comments
version-neutral where the described scoring behavior remains unchanged.

## Validation

- Installed Vally 0.14.0 through `.github/scripts/SetupVallyRuntime.sh`
- Strict-linted all 16 Vally evaluation specifications with Vally 0.14.0

Co-authored-by: PureWeen <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9e73594e-38bc-4937-80c8-cc054aa890d2
The Android SDK has handled optional missing uses-library entries since dotnet/android#9085, so MAUI no longer needs to demote XA4218 warnings.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 68923130-f067-406b-9fd4-e4145dd0983b
@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 -- 37941

Or

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

@jfversluis

Copy link
Copy Markdown
Member Author

@jonathanpeppers In an attempt to remove TODOs from the codebase, I came across this XA4218 workaround. The upstream issue was fixed by dotnet/android#9085 in July 2024, and the current .NET 10 / Android 36 toolchain passed the optional-library scenario without the suppression while still warning for required missing libraries. Does this seem like something we can remove?

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions github-actions Bot added area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging platform/android labels Aug 28, 2026

@jonathanpeppers jonathanpeppers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It seems like it was fixed in 2024:

@jfversluis
jfversluis marked this pull request as ready for review August 29, 2026 12:54
Copilot AI lite review requested due to automatic review settings August 29, 2026 12:54
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

Review tier: Lite
Findings: None

What changed in this PR

This PR removes an Android-specific MSBuild workaround in the Microsoft.Maui.Core build-transitive targets that previously downgraded XA4218 from warning/error to a message for Android builds. This aligns MAUI’s packaging with the current behavior of dotnet/android where XA4218 is no longer emitted for missing optional <uses-library android:required="false"> entries.

Changes:

  • Removed the MSBuildWarningsAsMessages;XA4218 injection for TargetPlatformIdentifier == Android from Microsoft.Maui.Core.After.targets.
File Description
src/​Core/​src/​nuget/​buildTransitive/​Microsoft.Maui.Core.After.targets Removes the Android XA4218 warnings-as-messages workaround from the build-transitive targets.

@kubaflo
kubaflo changed the base branch from main to inflight/current August 29, 2026 16:20
@kubaflo
kubaflo merged commit d2b7449 into inflight/current Aug 29, 2026
36 of 39 checks passed
@kubaflo
kubaflo deleted the jfversluis-validate-xa4218-workaround branch August 29, 2026 16:20
@github-actions github-actions Bot added this to the .NET 10 SR11 milestone Aug 29, 2026
kubaflo added a commit that referenced this pull request Sep 2, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Removes the obsolete Android workaround that added `XA4218` to
`MSBuildWarningsAsMessages` from the `Microsoft.Maui.Core`
build-transitive targets.

The workaround referenced dotnet/android#6809. That issue was fixed by
dotnet/android#9085 in July 2024: optional missing `<uses-library
android:required="false">` entries no longer emit XA4218, while required
missing libraries still correctly warn.

The current repository targets .NET 10 and Android API 36, well after
the upstream fix.

## Validation

- Packed `Microsoft.Maui.Core`, `Microsoft.Maui.Essentials`, and
`Microsoft.Maui.Graphics` for `net10.0-android36.0` after the removal.
- Referenced the locally packed `Microsoft.Maui.Core` package from a
minimal Android app.
- Confirmed the packaged `Microsoft.Maui.Core.After.targets` no longer
adds XA4218 to `MSBuildWarningsAsMessages`.
- Confirmed a missing optional `androidx.window.sidecar` library builds
with `-warnaserror` with 0 warnings and 0 errors.
- Confirmed the same missing library with `android:required="true"`
emits XA4218, proving the Android manifest task executes and preserves
the intended warning for required libraries.

## Issues Fixed

Relates to dotnet/android#6809.

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 3, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Removes the obsolete Android workaround that added `XA4218` to
`MSBuildWarningsAsMessages` from the `Microsoft.Maui.Core`
build-transitive targets.

The workaround referenced dotnet/android#6809. That issue was fixed by
dotnet/android#9085 in July 2024: optional missing `<uses-library
android:required="false">` entries no longer emit XA4218, while required
missing libraries still correctly warn.

The current repository targets .NET 10 and Android API 36, well after
the upstream fix.

## Validation

- Packed `Microsoft.Maui.Core`, `Microsoft.Maui.Essentials`, and
`Microsoft.Maui.Graphics` for `net10.0-android36.0` after the removal.
- Referenced the locally packed `Microsoft.Maui.Core` package from a
minimal Android app.
- Confirmed the packaged `Microsoft.Maui.Core.After.targets` no longer
adds XA4218 to `MSBuildWarningsAsMessages`.
- Confirmed a missing optional `androidx.window.sidecar` library builds
with `-warnaserror` with 0 warnings and 0 errors.
- Confirmed the same missing library with `android:required="true"`
emits XA4218, proving the Android manifest task executes and preserves
the intended warning for required libraries.

## Issues Fixed

Relates to dotnet/android#6809.

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 6, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Removes the obsolete Android workaround that added `XA4218` to
`MSBuildWarningsAsMessages` from the `Microsoft.Maui.Core`
build-transitive targets.

The workaround referenced dotnet/android#6809. That issue was fixed by
dotnet/android#9085 in July 2024: optional missing `<uses-library
android:required="false">` entries no longer emit XA4218, while required
missing libraries still correctly warn.

The current repository targets .NET 10 and Android API 36, well after
the upstream fix.

## Validation

- Packed `Microsoft.Maui.Core`, `Microsoft.Maui.Essentials`, and
`Microsoft.Maui.Graphics` for `net10.0-android36.0` after the removal.
- Referenced the locally packed `Microsoft.Maui.Core` package from a
minimal Android app.
- Confirmed the packaged `Microsoft.Maui.Core.After.targets` no longer
adds XA4218 to `MSBuildWarningsAsMessages`.
- Confirmed a missing optional `androidx.window.sidecar` library builds
with `-warnaserror` with 0 warnings and 0 errors.
- Confirmed the same missing library with `android:required="true"`
emits XA4218, proving the Android manifest task executes and preserves
the intended warning for required libraries.

## Issues Fixed

Relates to dotnet/android#6809.

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 7, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Removes the obsolete Android workaround that added `XA4218` to
`MSBuildWarningsAsMessages` from the `Microsoft.Maui.Core`
build-transitive targets.

The workaround referenced dotnet/android#6809. That issue was fixed by
dotnet/android#9085 in July 2024: optional missing `<uses-library
android:required="false">` entries no longer emit XA4218, while required
missing libraries still correctly warn.

The current repository targets .NET 10 and Android API 36, well after
the upstream fix.

## Validation

- Packed `Microsoft.Maui.Core`, `Microsoft.Maui.Essentials`, and
`Microsoft.Maui.Graphics` for `net10.0-android36.0` after the removal.
- Referenced the locally packed `Microsoft.Maui.Core` package from a
minimal Android app.
- Confirmed the packaged `Microsoft.Maui.Core.After.targets` no longer
adds XA4218 to `MSBuildWarningsAsMessages`.
- Confirmed a missing optional `androidx.window.sidecar` library builds
with `-warnaserror` with 0 warnings and 0 errors.
- Confirmed the same missing library with `android:required="true"`
emits XA4218, proving the Android manifest task executes and preserves
the intended warning for required libraries.

## Issues Fixed

Relates to dotnet/android#6809.

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 8, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Removes the obsolete Android workaround that added `XA4218` to
`MSBuildWarningsAsMessages` from the `Microsoft.Maui.Core`
build-transitive targets.

The workaround referenced dotnet/android#6809. That issue was fixed by
dotnet/android#9085 in July 2024: optional missing `<uses-library
android:required="false">` entries no longer emit XA4218, while required
missing libraries still correctly warn.

The current repository targets .NET 10 and Android API 36, well after
the upstream fix.

## Validation

- Packed `Microsoft.Maui.Core`, `Microsoft.Maui.Essentials`, and
`Microsoft.Maui.Graphics` for `net10.0-android36.0` after the removal.
- Referenced the locally packed `Microsoft.Maui.Core` package from a
minimal Android app.
- Confirmed the packaged `Microsoft.Maui.Core.After.targets` no longer
adds XA4218 to `MSBuildWarningsAsMessages`.
- Confirmed a missing optional `androidx.window.sidecar` library builds
with `-warnaserror` with 0 warnings and 0 errors.
- Confirmed the same missing library with `android:required="true"`
emits XA4218, proving the Android manifest task executes and preserves
the intended warning for required libraries.

## Issues Fixed

Relates to dotnet/android#6809.

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 9, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Removes the obsolete Android workaround that added `XA4218` to
`MSBuildWarningsAsMessages` from the `Microsoft.Maui.Core`
build-transitive targets.

The workaround referenced dotnet/android#6809. That issue was fixed by
dotnet/android#9085 in July 2024: optional missing `<uses-library
android:required="false">` entries no longer emit XA4218, while required
missing libraries still correctly warn.

The current repository targets .NET 10 and Android API 36, well after
the upstream fix.

## Validation

- Packed `Microsoft.Maui.Core`, `Microsoft.Maui.Essentials`, and
`Microsoft.Maui.Graphics` for `net10.0-android36.0` after the removal.
- Referenced the locally packed `Microsoft.Maui.Core` package from a
minimal Android app.
- Confirmed the packaged `Microsoft.Maui.Core.After.targets` no longer
adds XA4218 to `MSBuildWarningsAsMessages`.
- Confirmed a missing optional `androidx.window.sidecar` library builds
with `-warnaserror` with 0 warnings and 0 errors.
- Confirmed the same missing library with `android:required="true"`
emits XA4218, proving the Android manifest task executes and preserves
the intended warning for required libraries.

## Issues Fixed

Relates to dotnet/android#6809.

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 11, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Removes the obsolete Android workaround that added `XA4218` to
`MSBuildWarningsAsMessages` from the `Microsoft.Maui.Core`
build-transitive targets.

The workaround referenced dotnet/android#6809. That issue was fixed by
dotnet/android#9085 in July 2024: optional missing `<uses-library
android:required="false">` entries no longer emit XA4218, while required
missing libraries still correctly warn.

The current repository targets .NET 10 and Android API 36, well after
the upstream fix.

## Validation

- Packed `Microsoft.Maui.Core`, `Microsoft.Maui.Essentials`, and
`Microsoft.Maui.Graphics` for `net10.0-android36.0` after the removal.
- Referenced the locally packed `Microsoft.Maui.Core` package from a
minimal Android app.
- Confirmed the packaged `Microsoft.Maui.Core.After.targets` no longer
adds XA4218 to `MSBuildWarningsAsMessages`.
- Confirmed a missing optional `androidx.window.sidecar` library builds
with `-warnaserror` with 0 warnings and 0 errors.
- Confirmed the same missing library with `android:required="true"`
emits XA4218, proving the Android manifest task executes and preserves
the intended warning for required libraries.

## Issues Fixed

Relates to dotnet/android#6809.

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 15, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Removes the obsolete Android workaround that added `XA4218` to
`MSBuildWarningsAsMessages` from the `Microsoft.Maui.Core`
build-transitive targets.

The workaround referenced dotnet/android#6809. That issue was fixed by
dotnet/android#9085 in July 2024: optional missing `<uses-library
android:required="false">` entries no longer emit XA4218, while required
missing libraries still correctly warn.

The current repository targets .NET 10 and Android API 36, well after
the upstream fix.

## Validation

- Packed `Microsoft.Maui.Core`, `Microsoft.Maui.Essentials`, and
`Microsoft.Maui.Graphics` for `net10.0-android36.0` after the removal.
- Referenced the locally packed `Microsoft.Maui.Core` package from a
minimal Android app.
- Confirmed the packaged `Microsoft.Maui.Core.After.targets` no longer
adds XA4218 to `MSBuildWarningsAsMessages`.
- Confirmed a missing optional `androidx.window.sidecar` library builds
with `-warnaserror` with 0 warnings and 0 errors.
- Confirmed the same missing library with `android:required="true"`
emits XA4218, proving the Android manifest task executes and preserves
the intended warning for required libraries.

## Issues Fixed

Relates to dotnet/android#6809.

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 18, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Removes the obsolete Android workaround that added `XA4218` to
`MSBuildWarningsAsMessages` from the `Microsoft.Maui.Core`
build-transitive targets.

The workaround referenced dotnet/android#6809. That issue was fixed by
dotnet/android#9085 in July 2024: optional missing `<uses-library
android:required="false">` entries no longer emit XA4218, while required
missing libraries still correctly warn.

The current repository targets .NET 10 and Android API 36, well after
the upstream fix.

## Validation

- Packed `Microsoft.Maui.Core`, `Microsoft.Maui.Essentials`, and
`Microsoft.Maui.Graphics` for `net10.0-android36.0` after the removal.
- Referenced the locally packed `Microsoft.Maui.Core` package from a
minimal Android app.
- Confirmed the packaged `Microsoft.Maui.Core.After.targets` no longer
adds XA4218 to `MSBuildWarningsAsMessages`.
- Confirmed a missing optional `androidx.window.sidecar` library builds
with `-warnaserror` with 0 warnings and 0 errors.
- Confirmed the same missing library with `android:required="true"`
emits XA4218, proving the Android manifest task executes and preserves
the intended warning for required libraries.

## Issues Fixed

Relates to dotnet/android#6809.

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 21, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Removes the obsolete Android workaround that added `XA4218` to
`MSBuildWarningsAsMessages` from the `Microsoft.Maui.Core`
build-transitive targets.

The workaround referenced dotnet/android#6809. That issue was fixed by
dotnet/android#9085 in July 2024: optional missing `<uses-library
android:required="false">` entries no longer emit XA4218, while required
missing libraries still correctly warn.

The current repository targets .NET 10 and Android API 36, well after
the upstream fix.

## Validation

- Packed `Microsoft.Maui.Core`, `Microsoft.Maui.Essentials`, and
`Microsoft.Maui.Graphics` for `net10.0-android36.0` after the removal.
- Referenced the locally packed `Microsoft.Maui.Core` package from a
minimal Android app.
- Confirmed the packaged `Microsoft.Maui.Core.After.targets` no longer
adds XA4218 to `MSBuildWarningsAsMessages`.
- Confirmed a missing optional `androidx.window.sidecar` library builds
with `-warnaserror` with 0 warnings and 0 errors.
- Confirmed the same missing library with `android:required="true"`
emits XA4218, proving the Android manifest task executes and preserves
the intended warning for required libraries.

## Issues Fixed

Relates to dotnet/android#6809.

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 27, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Removes the obsolete Android workaround that added `XA4218` to
`MSBuildWarningsAsMessages` from the `Microsoft.Maui.Core`
build-transitive targets.

The workaround referenced dotnet/android#6809. That issue was fixed by
dotnet/android#9085 in July 2024: optional missing `<uses-library
android:required="false">` entries no longer emit XA4218, while required
missing libraries still correctly warn.

The current repository targets .NET 10 and Android API 36, well after
the upstream fix.

## Validation

- Packed `Microsoft.Maui.Core`, `Microsoft.Maui.Essentials`, and
`Microsoft.Maui.Graphics` for `net10.0-android36.0` after the removal.
- Referenced the locally packed `Microsoft.Maui.Core` package from a
minimal Android app.
- Confirmed the packaged `Microsoft.Maui.Core.After.targets` no longer
adds XA4218 to `MSBuildWarningsAsMessages`.
- Confirmed a missing optional `androidx.window.sidecar` library builds
with `-warnaserror` with 0 warnings and 0 errors.
- Confirmed the same missing library with `android:required="true"`
emits XA4218, proving the Android manifest task executes and preserves
the intended warning for required libraries.

## Issues Fixed

Relates to dotnet/android#6809.

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 27, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Removes the obsolete Android workaround that added `XA4218` to
`MSBuildWarningsAsMessages` from the `Microsoft.Maui.Core`
build-transitive targets.

The workaround referenced dotnet/android#6809. That issue was fixed by
dotnet/android#9085 in July 2024: optional missing `<uses-library
android:required="false">` entries no longer emit XA4218, while required
missing libraries still correctly warn.

The current repository targets .NET 10 and Android API 36, well after
the upstream fix.

## Validation

- Packed `Microsoft.Maui.Core`, `Microsoft.Maui.Essentials`, and
`Microsoft.Maui.Graphics` for `net10.0-android36.0` after the removal.
- Referenced the locally packed `Microsoft.Maui.Core` package from a
minimal Android app.
- Confirmed the packaged `Microsoft.Maui.Core.After.targets` no longer
adds XA4218 to `MSBuildWarningsAsMessages`.
- Confirmed a missing optional `androidx.window.sidecar` library builds
with `-warnaserror` with 0 warnings and 0 errors.
- Confirmed the same missing library with `android:required="true"`
emits XA4218, proving the Android manifest task executes and preserves
the intended warning for required libraries.

## Issues Fixed

Relates to dotnet/android#6809.

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 29, 2026
@github-actions github-actions Bot modified the milestones: .NET 10 SR11, .NET 10 SR12 Oct 21, 2026

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — bc79a3c9 Deployed Aug 28, 2026 by jfversluis via conclusion #1602
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging platform/android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants