Skip to content

[net11.0] Fix Skia dependencies and Android CI blockers - #38538

Merged
kubaflo merged 3 commits into
net11.0from
kubaflo-net11-ci-fix
Sep 15, 2026
Merged

kubaflo merged 3 commits into
net11.0from
kubaflo-net11-ci-fix

Conversation

@kubaflo

@kubaflo kubaflo commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

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 of Change

Targets net11.0.

The automated main-to-net11.0 merge #38455 brought in the SkiaSharp 4 source changes from #37731 while retaining the older dependency and packaging definitions. Graphics.Skia therefore uses SKPathBuilder and the newer DrawBitmap overload but restores SkiaSharp 3.116.1. This breaks Windows/macOS solution builds, unit-test builds, and macOS packing; Helix monitoring and native-artifact publishing fail downstream.

Restore the coordinated upgrade from #37731:

  • SkiaSharp 4.150.1, SkiaSharp.Extended 3.0.0, HarfBuzzSharp 14.2.1.1, and Svg.Skia 5.1.1.
  • Matching System.Memory, System.Buffers, and ExCSS versions.
  • Svg.SceneGraph and Svg.Animation version mappings, Resizetizer package contents, and third-party signing entries.

With Graphics compiling, PR build 1596609 exposed two further Android recreation-test compilation problems. This PR also:

  • Aliases Android.Content.ActivityFlags so the new AndroidX.Activity.ActivityFlags type does not make intent flags ambiguous.
  • Shares an API-aware task-ID lookup between activity-result monitoring and the recreation test: TaskInfo.TaskId on Android 29+, RecentTaskInfo.PersistentId on Android 24–28. This preserves support for older Android versions instead of suppressing the platform warning or raising the minimum OS version.

PR build 1596661 then reached integration testing and exposed JDK-discovery failures in macOS NativeAOT and Windows/macOS MultiProject tests. Although provisioning selected a valid JDK, Android SDK discovery still inspected broken system registrations (java_home -X returning empty XML) or the parent of a nested Windows JDK installation (missing jar). ProvisionJdk now publishes the validated home as JavaSdkDirectory in addition to JAVA_HOME, so downstream MSBuild processes use that JDK directly. The existing JDK validation and strict integration-test warning checks remain intact.

No Graphics implementation changes, public API additions, or warning suppressions are needed.

Issues Fixed

Fixes the persistent maui-pr compilation failure on net11.0, observed in build 1593297 and build 1594662, plus the Android compilation and JDK-discovery blockers subsequently exposed in PR builds 1596609 and 1596661.

Validation

Full CI: maui-pr build 1596781 completed successfully for head 7cbfdec35ece2ad29e072bae352fd29d3f417abb on September 15, 2026. All 31 jobs succeeded, including Windows/macOS Debug/Release solution builds, both packaging jobs, and all integration jobs. All 48 Helix unit-test work items passed.

The previously failing JDK-sensitive integration jobs now pass: macOS AOT (18 passed), MultiProject macOS and Windows (19 passed and four existing skips each). The final Windows Build integration suite passed 84 tests with two existing skips. No tests were skipped or warning checks relaxed by this PR.

Local and earlier CI evidence:

  • Reproduced all seven CS0246/CS1501 errors with a targeted Graphics.Skia netstandard2.0 build before the change; the identical build passes afterward with zero warnings/errors.
  • Graphics.Tests (net11.0): 375 passed.
  • Resizetizer.UnitTests (net11.0): 782 passed, 2 skipped.
  • Resizetizer packing succeeds; the package contains all required Skia/SVG assemblies, including Svg.SceneGraph and Svg.Animation.
  • Confirmed restored managed/native package versions are aligned.
  • Reproduced both CS0104 intent-flag errors and the CA1416 task-ID error locally in Essentials.DeviceTests for net11.0-android; the same Debug build succeeds after the Android repair, with only existing MAUI1001 warnings.
  • Android API 30 emulator: all six ActivityStateManager tests passed, including all three recreation tests. The Essentials runner did not apply the requested category filter, so this run also exercised the broader suite: 386 passed, 30 ignored, and four Launcher mailto-resolution failures. Confirmed the emulator has no mailto handler. The API 24–28 task-ID fallback remains untested at runtime.
  • Before the JDK repair, CI build 1596661 passed both macOS solution configurations, Windows/macOS packing, and all 48 Helix unit-test work items across Windows/macOS and Debug/Release. Its iOS runtime integration cases also passed.
  • Ran ProvisionJdk locally and verified that both Azure variables contain the validated JDK home. Passed its emitted value to a fresh Android _ResolveSdks invocation using Azure's uppercase environment-variable convention; it selected the expected JDK even with an intentionally invalid JAVA_HOME. The CI agent-specific broken registrations were not reproduced locally.

Local validation used the installed .NET 11 Preview 6 SDK; the successful full maui-pr build used the branch's RC.2 SDK.

Restore the dependency versions and SVG packaging/signing entries omitted when the SkiaSharp 4 source changes were merged from main. This fixes the missing SKPathBuilder and DrawBitmap overload build errors.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 14, 2026 22:06
@kubaflo
kubaflo deployed to copilot-pat-pool September 14, 2026 22:06 — with GitHub Actions Active
@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 -- 38538

Or

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

@kubaflo
kubaflo changed the base branch from main to net11.0 September 14, 2026 22:07
@kubaflo
kubaflo deployed to copilot-pat-pool September 14, 2026 22:07 — with GitHub Actions Active
@kubaflo

kubaflo commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

/azp run maui-pr

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@github-actions

Copy link
Copy Markdown
Contributor

Skill Validation Results

@kubaflo — new skill validation results are available based on this last commit: 1693dbf.
To request a fresh validation after new comments or commits, comment /evaluate-skills.

Overall Passed Static Passed LLM Skipped Skills 25 Agents 6

✅ Skill Validation Results — 1693dbf · [net11.0] Restore coordinated SkiaSharp 4 dependencies · 2026-09-14T22:08:22Z

✅ Static Checks Passed

Skills: 25 | Eval specs linted: 16

Full lint output
── .github/skills/agentic-labeler/tests/eval.vally.yaml
Vally collects pseudonymous usage telemetry (command name, version, outcome, duration, persistent device identifier (when available), and coarse OS/runtime info) to improve the product. No prompts, datasets, file paths, or arguments are collected.
Opt out any time by setting VALLY_TELEMETRY_OPTOUT=1 or DO_NOT_TRACK=1.
Learn more: https://aka.ms/vally/telemetry
✔ .github/skills/agentic-labeler/tests/eval.vally.yaml is valid
── .github/skills/analyze-sessions/tests/eval.vally.yaml
✔ .github/skills/analyze-sessions/tests/eval.vally.yaml is valid
── .github/skills/ci-fix/tests/eval.ownership.vally.yaml
✔ .github/skills/ci-fix/tests/eval.ownership.vally.yaml is valid
── .github/skills/ci-fix/tests/eval.vally.yaml
✔ .github/skills/ci-fix/tests/eval.vally.yaml is valid
── .github/skills/code-review/tests/eval.inline-findings.vally.yaml
✔ .github/skills/code-review/tests/eval.inline-findings.vally.yaml is valid
── .github/skills/code-review/tests/eval.producer-trace.vally.yaml
✔ .github/skills/code-review/tests/eval.producer-trace.vally.yaml is valid
── .github/skills/code-review/tests/eval.trim-aot.vally.yaml
✔ .github/skills/code-review/tests/eval.trim-aot.vally.yaml is valid
── .github/skills/code-review/tests/eval.vally.yaml
✔ .github/skills/code-review/tests/eval.vally.yaml is valid
── .github/skills/code-review/tests/hermeticity.vally.yaml
✔ .github/skills/code-review/tests/hermeticity.vally.yaml is valid
── .github/skills/code-review/tests/soak.capability.vally.yaml
✔ .github/skills/code-review/tests/soak.capability.vally.yaml is valid
── .github/skills/evaluate-pr-tests/tests/eval.vally.yaml
✔ .github/skills/evaluate-pr-tests/tests/eval.vally.yaml is valid
── .github/skills/pr-review/tests/eval.gh-auth.vally.yaml
✔ .github/skills/pr-review/tests/eval.gh-auth.vally.yaml is valid
── .github/skills/try-fix/tests/eval.restore.vally.yaml
✔ .github/skills/try-fix/tests/eval.restore.vally.yaml is valid
── .github/skills/try-fix/tests/eval.vally.yaml
✔ .github/skills/try-fix/tests/eval.vally.yaml is valid
── .github/skills/verify-tests-fail-without-fix/tests/eval.protocol.vally.yaml
✔ .github/skills/verify-tests-fail-without-fix/tests/eval.protocol.vally.yaml is valid
── .github/skills/verify-tests-fail-without-fix/tests/eval.vally.yaml
✔ .github/skills/verify-tests-fail-without-fix/tests/eval.vally.yaml is valid

⏭️ LLM Evaluation: Skipped

No changed skills with eval specs found.

🔍 Full results and investigation steps

@kubaflo
kubaflo deployed to copilot-pat-pool September 14, 2026 22:08 — with GitHub Actions Active
@kubaflo

kubaflo commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

/azp run maui-pr

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@kubaflo
kubaflo deployed to copilot-pat-pool September 14, 2026 22:10 — with GitHub Actions Active
@kubaflo
kubaflo deployed to copilot-pat-pool September 14, 2026 22:11 — with GitHub Actions Active
@kubaflo
kubaflo deployed to copilot-pat-pool September 14, 2026 22:11 — with GitHub Actions Active

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.

🔵 Needs a closer look

Coordinated dependency, packaging, and signing changes require final human review.

Pull request overview

Restores coordinated SkiaSharp 4 dependencies and packaging definitions for net11.0.

Changes:

  • Updates graphics, SVG, memory, buffer, and ExCSS dependency versions.
  • Adds SVG assemblies to packaging, version mappings, and signing.
File summaries
File Description
src/SingleProject/Resizetizer/src/ResizetizerPackages.projitems Adds required SVG assemblies to the package.
eng/Versions.props Updates coordinated dependency versions.
eng/Signing.props Adds signing entries for new assemblies.
eng/NuGetVersions.targets Maps SVG dependencies to restored versions.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Lite

@kubaflo

kubaflo commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

@dalexsoto stamp

dalexsoto
dalexsoto previously approved these changes Sep 14, 2026

@dalexsoto dalexsoto 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.

Stamping as requested by @kubaflo; no code review performed.

Disambiguate Android intent flags from AndroidX.Activity.ActivityFlags. Share an API-aware task ID lookup between activity-result monitoring and its recreation test: use TaskId on Android 29+ and PersistentId on older supported versions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 14, 2026 22:48
@kubaflo

kubaflo commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

/azp run maui-pr

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@kubaflo kubaflo changed the title [net11.0] Restore coordinated SkiaSharp 4 dependencies [net11.0] Fix Skia dependencies and Android activity task lookup Sep 14, 2026

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.

🔵 Needs a closer look

The Android 24–28 task-ID fallback lacks runtime validation.

Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment on lines +29 to +32
internal static int GetTaskId(ActivityManager.RecentTaskInfo taskInfo) =>
OperatingSystem.IsAndroidVersionAtLeast(29)
? taskInfo.TaskId
: taskInfo.PersistentId;
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@kubaflo

kubaflo commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

/azp run maui-pr

Copilot AI review requested due to automatic review settings September 14, 2026 23:49
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@kubaflo kubaflo changed the title [net11.0] Fix Skia dependencies and Android activity task lookup [net11.0] Fix Skia dependencies and Android CI blockers Sep 14, 2026

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.

🔵 Needs a closer look

The Android API 24–28 task-ID fallback still needs runtime or equivalent deterministic test coverage.

Review details

Suppressed comments (2)

src/Essentials/src/Platform/PlatformUtils.android.cs:32

  • This introduces the supported Android 24–28 fallback, but the recreation tests exercise the API 30 TaskId branch only. A mismatch between Activity.TaskId and RecentTaskInfo.PersistentId on an older device would therefore go undetected while this helper controls whether pending requests are canceled or kept alive. Add an API 24–28 device test/leg, or a deterministic seam that exercises the fallback, before relying on this path.
		internal static int GetTaskId(ActivityManager.RecentTaskInfo taskInfo) =>
			OperatingSystem.IsAndroidVersionAtLeast(29)
				? taskInfo.TaskId
				: taskInfo.PersistentId;

src/Essentials/test/DeviceTests/Tests/ActivityStateManagerRecreation_Tests.Android.cs:200

  • The recreation tests exercise GetTaskId only on the API 30 emulator, so the newly introduced PersistentId branch for Android 24–28 is not validated. Because this branch is the compatibility path that avoids the TaskId API warning, please add a runtime test on a pre-29 emulator (or an equivalent test seam) before relying on it for older supported Android versions.
			if (appTask.TaskInfo is { } taskInfo && PlatformUtils.GetTaskId(taskInfo) == taskId)
  • Files reviewed: 9/9 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@kubaflo

kubaflo commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

@dalexsoto stamp

@kubaflo
kubaflo merged commit e381c05 into net11.0 Sep 15, 2026
38 checks passed
@kubaflo
kubaflo deleted the kubaflo-net11-ci-fix branch September 15, 2026 16:27
@github-actions github-actions Bot added this to the .NET 11.0-preview7 milestone Sep 15, 2026
simonrozsival added a commit to dotnet/android that referenced this pull request Sep 16, 2026
R8 9.4.17 inlines and removes companion methods; disabling optimization alone still allows their names to be obfuscated. Disable optimization and obfuscation only in the interface parity fixture, keeping shrinking and the existing DEX/JNI assertions enabled.

Replayed the CoreCLR and NativeAOT CI Java inputs and keep rules locally at API 21 and 24, and compared all existing DEX-shape assertions against these outputs and D8. The MAUI Skia dependency mismatch was fixed independently by dotnet/maui#38538.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 23, 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

Repair `maui-pr` on `release/11.0.1xx-rc2` without downgrading its Apple
27.0 or Android 37.0 platform SDKs.

| Failure | Fix |
|---|---|
| Apple manifests reference unavailable .NET 10 compatibility packs
`26.5.10322` | Add the verified public feed from BAR build 332005
outside dependency-flow-managed sources. |
| SVG restore downgrades and Skia 4 compilation errors | Restore
coordinated SkiaSharp/HarfBuzz/SVG/ExCSS/System.Memory/System.Buffers
pins used by net11.0 and #38538. |
| Aces agents lack Xcode 27 | Select MAUI agents advertising Xcode 27 RC
for public macOS jobs; fail explicitly if the required Xcode is absent.
|
| Universal iOS 27 simulator download is unavailable | Select native
ARM64 on Apple Silicon; retain universal on Intel. Keep downloads
version-pinned and fail unavailable downloads before destructive
simulator recovery. |
| Apple library TFMs still target 26.5 | Align current Apple TFMs and
SDK defaults to 27.0; preserve previous-.NET TFMs. |
| Xcode 27 rejects native iOS 12.x / mapped macOS 10.15 minimums | Set
native and managed iOS minimums to 15.0, matching app templates. Native
iOS 15.0 maps to macOS 12.0 for Catalyst. |
| Apple binding generator needs a newer .NET host runtime | Align
bootstrap, workload-provisioning, and SDK provenance pins at
`11.0.100-rc.2.26470.103`, from green net11 build 1607497. Its runtime
satisfies Apple's `26465.108` minimum; other product/Arcade pins stay
unchanged. |
| Helix monitor selects unauthorized `NetCore-Svc-Public` | Reuse the
submission pool and preserve public/internal Linux image demands. |
| Raster image assertions pass, but Windows test cleanup encounters a
sharing violation | Reuse `BaseTest`'s existing RC1-era bounded, logged
cleanup retries from #38124. Put raster outputs in its isolated
directory and dispose raster tools deterministically. |

Compared RC1 at `484132f9e5`: retain its native-runtime download
capability and established test-cleanup handling, without copying
unpinned fallback behavior or downgrading RC2 platform inputs. Its
latest 15 branch builds were not green, so its entire dependency set is
not treated as a known-good replacement.

Add focused regression checks and CI troubleshooting guidance. No test
skips, assertion weakening, warning suppressions, or pool-permission
changes. Cleanup still fails after retry exhaustion. Rebased onto RC2
`2fe346448b`.

**Compatibility:** The declared iOS minimum increases from 13.0 to 15.0
to match the native framework required by Xcode 27. Previous-.NET TFM
identifiers remain unchanged.

## Validation

- **Full latest-head `maui-pr` succeeded:** [build
1608203](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1608203),
completed 2026-09-23 at 08:17 UTC for source head
`7c8e9a5d710c2552ed3901caed84bfd87cfcb47f`. All 31 jobs and all four
stages succeeded; the complete 1,233-record timeline contains no failed,
canceled, or abandoned records.
- All 48 Helix work items passed. Actual failed-result queries across
all 26 published test runs returned no failures. The previously failing
raster test is explicitly `Pass` in both Windows Debug and Release
uploaded XML.
- Android integration: all 11 tests passed, with zero failures or skips,
including NativeAOT, net10/net11, MAUI/Blazor, Debug/Release, and
full-trimming scenarios. The long overall build duration was dominated
by waiting for capacity in `MAUI-DNCENG`; the Android job itself took
25m35s. No pool or coverage bypass was used.
- Reproduced Resizetizer restore downgrades and seven Graphics.Skia
compilation errors before fixing dependencies; Graphics.Skia builds
afterward.
- Graphics.Tests: 375 passed. Full Resizetizer suite after the cleanup
change on the selected RC2 SDK: 782 passed, 2 existing platform skips.
All 23 raster tests pass. Resizetizer packaging contains the required
SVG/Skia/HarfBuzz assemblies.
- Pipeline/Review-PR Pester checks: 103 passed, covering executed Bash
download scenarios, Apple SDK/TFM consistency, deployment minimums, and
SDK pin alignment.
- Native Release archives pass locally for iOS device, simulator, and
Catalyst. Effective Catalyst settings confirm the macOS 12.0 mapping. CI
subsequently built these using Xcode 27.
- Confirmed the exact Apple binding-generator runtime requirement from
its package and successfully launched that actual tool with the newly
selected SDK runtime.
- MSBuild evaluation confirms net11 Apple 27.0 and Android 37.0 TFMs,
with unchanged net10 compatibility TFMs.
- Original pipeline regressions fail against the release baseline and
pass with the fixes. Compatibility packages, XML/YAML parsing, Xcode
project lint, Bash syntax, scoped formatting, and whitespace checks were
verified.

## CI progression

Original failures:
[1607595](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1607595),
[1607490](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1607490).

-
[1607851](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1607851):
removed attempted legacy Provisionator enablement; that task is
unavailable publicly.
-
[1607874](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1607874):
Xcode selected; exposed universal-runtime download issue.
-
[1607921](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1607921):
runtime/workloads installed; exposed TFM mismatch.
-
[1608019](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1608019):
exposed native deployment minimums.
-
[1608031](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1608031):
native compilation passed; exposed binding-generator host runtime.
-
[1608055](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1608055):
all four framework build jobs, both pack jobs, and completed integration
jobs passed. One Windows Debug Resizetizer cleanup failed; fixed in
`7c8e9a5d71`. Android had not started before the next push superseded
this run.
-
[1608203](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1608203):
**succeeded on the final head**. All build, packaging, unit-test, and
integration-test jobs passed, including Android. Build Analysis and
Build Insights also passed.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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