Skip to content

Move main to .NET 12 - #40060

Open
kubaflo wants to merge 62 commits into
dotnet:mainfrom
kubaflo:dev/kubaflo/main-net12
Open

kubaflo wants to merge 62 commits into
dotnet:mainfrom
kubaflo:dev/kubaflo/main-net12

Conversation

@kubaflo

@kubaflo kubaflo commented Nov 9, 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!

Target Branch

This PR is for Initial base
New features, API changes, or .NET 12 work (including .NET 12 fixes) main
.NET 11 servicing fixes net11, for review
Older servicing, release integration, infrastructure, or documentation The branch designated for that work

For .NET 11 fixes, only a maintainer retargets the approved PR to the active
inflight lane and merges it after CI validates that final base. Do not merge
individual fixes directly into net11; agents must not retarget or merge.

Description of Change

Moves main from .NET 11 to .NET 12. (net11 is now the .NET 11 servicing branch.)

SDK / workloads — taken from coherent main builds of dotnet/android and dotnet/macios, which are both built against the same VMR SDK:

Version
.NET SDK / runtime 12.0.100-alpha.1.26523.103 / 12.0.0-alpha.1.26523.103
iOS (net12.0_27.1) 27.1.12089-net12-p1
Mac Catalyst / macOS / tvOS (net12.0_27.0) 27.0.13384-net12-p1 (same macios commit 7af83b1)
Android 37.99.0-preview.1.358
Workload manifest band 12.0.100-alpha.1

Arcade stays on 11 for now.

Changes

  • global.json, eng/Versions.props, eng/Version.Details.xml: SDK, runtime, Apple and Android versions; MajorVersion, SdkBandVersion and AssemblyVersion are now 12. Previous-framework workload metadata is aligned with the retained upstream parents.
  • Directory.Build.props: current TFM net12.0, iOS TPV 27.1.
  • Previous TFM is now net11 instead of net10. The net12 Apple and Android workload manifests only include net12 and net11 packs, so net10 can no longer build with this SDK. This updates the runtime manifests in Workloads.csproj (net10 → net11), MicrosoftMauiPreviousDotNetReleasedVersion (11.0.0-rc.2.26505.5) and the integration-test constants.
  • NuGet.config:
    • adds the dotnet12 and dotnet12-transport feeds;
    • adds two darc feeds from macios release/11.0.1xx. The net12 Apple manifests pin their net11 packs to builds that are only published there.
  • CI and tests:
    • ValidateXcodeVersion=false bypasses version validation, but cannot supply the iOS 27.1 APIs missing from agents with Xcode 27.0. Those public Apple builds remain blocked until a suitable toolchain is available.
    • The previous-framework Build and AOT integration partitions are retained. The mixed-platform Build partition uses the regular pool; previous-framework iOS-only jobs request Xcode 27.0. Two iOS simulator-x64 NativeAOT cases run against net11 as compatibility coverage, not as a substitute for net12 x64 coverage.
    • Internal Xcode provisioning uses the pinned package, validates its metadata and preserves explicit job-level Xcode pins. The iOS UI host has a scene manifest and simulator selection checks device compatibility.
    • Android and Apple CoreCLR device hosts build separately so Apple build failures do not block Android device tests. Apple job names avoid invalid log-artifact characters.
    • Android input-method service access uses Java type mapping and preserves the shared service lifetime. Java file-not-found exception constructors are retained at both Android asset-open boundaries for trimmed CoreCLR builds.
  • Test snapshots that embed the assembly version: 11.0.0.0 → 12.0.0.0.
  • Cake defaults now use net12.0.

Coverage still unresolved: this PR currently removes the Android Mono device-test lane and the net12 iOS simulator-x64 UI-host target because those runtime configurations are no longer supplied by the current upstream workloads. The net11 x64 cases do not restore equivalent net12 coverage. The retained iOS Mono device build also fails to link with the current workload. The request to keep every test configuration enabled is therefore not yet satisfied.

Validation: The previous-framework Build partition passed 15/15 locally, the restored net11 iOS simulator-x64 NativeAOT cases passed 2/2, current-framework iOS arm64 NativeAOT passed 2/2, and two iOS simulator integration cases passed 2/2. Apple validation used local Xcode 27.1 with the version check bypassed where required. On an Android API 33 arm64 emulator with .NET 12 CoreCLR, the Entry category passed 246 tests with 2 skipped, Essentials passed 424/424, and HybridWebView passed 97 tests with 5 skipped. Controlled reversions reproduced the input-service and missing-file failures. Full local Core and Controls runs still had failures; not all Controls leak-assertion failures have been classified. Latest-head CI is running; actual internal Xcode-package installation and the strict Xcode 27.0 job pin still require CI validation.

Issues Fixed

N/A — SDK migration.

Follow-ups (not in this PR)

  • Move Arcade to 12 and wire up Maestro subscriptions for the .NET 12 channels.
  • Provide Xcode 27.1 or later on the public macOS agents, then remove ValidateXcodeVersion=false where no longer needed.
  • Resolve the missing Android Mono and net12 iOS simulator-x64 coverage without misrepresenting a previous-framework lane as equivalent.

@kubaflo

This comment has been minimized.

@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 9, 2026 00:01 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Nov 9, 2026

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 -- 40060

Or

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

@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 9, 2026 00:01 — with GitHub Actions Inactive
@azure-pipelines

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 9, 2026 00:02 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 9, 2026 00:04 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 9, 2026 00:05 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 9, 2026 00:06 — with GitHub Actions Inactive
@kubaflo

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@kubaflo

This comment has been minimized.

@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

This comment has been minimized.

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Nov 9, 2026
@azure-pipelines

This comment has been minimized.

@kubaflo

This comment has been minimized.

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

@MauiBot

This comment has been minimized.

@MauiBot MauiBot added s/agent-gate-failed AI could not verify tests catch the bug and removed s/agent-review-in-progress AI review is currently running for this PR labels Nov 9, 2026
@kubaflo

This comment has been minimized.

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Nov 9, 2026
@azure-pipelines

This comment has been minimized.

@kubaflo

This comment has been minimized.

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

@MauiBot

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@kubaflo

This comment has been minimized.

@MauiBot

This comment has been minimized.

@github-actions github-actions Bot 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.

Expert Review — 8 findings

Reviewed commit c10ad7b.

Source assessment incomplete (12/13 dimensions); finding count is partial.

See inline comments for details.

# Tools such as Cake target net10.0; let them run on the repo's .NET 12 preview runtime when
# no .NET 10 runtime is installed (their own roll-forward setting skips prerelease runtimes).
- name: DOTNET_ROLL_FORWARD
value: Major

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.

[major] Logic and Correctness Verification - Major-version roll-forward does not permit release-targeted tools to select prerelease runtimes. The Windows device-test stage provisions .dotnet, prepends it to PATH, then invokes the net10.0 Cake tool for its unpackaged and packaged builds. src/DotNet/DotNet.csproj deletes and recreates that isolated installation with the pinned .NET 12 alpha SDK/runtime, so Cake still fails framework resolution before building the apps. A stable runtime under the system dotnet installation does not populate this root. Enable DOTNET_ROLL_FORWARD_TO_PRERELEASE=1 for the affected invocations or install a compatible stable runtime into their selected root.

Comment thread eng/pipelines/ci.yml

# The .NET 11 iOS compatibility workload recommends Xcode 27.0.
- name: previousXcodeVersion
type: string

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.

[major] Input and Path Correctness - The unrestricted previousXcodeVersion parameter flows through job.xcodeVersion into the job's XCODE variable in stage-integration-tests.yml, then Azure substitutes it into executable Bash at XCODE_MAJOR_MINOR=$(XCODE) in common/provision.yml. Supplying 27.0 beta makes Bash attempt to execute beta after the assignment instead of treating the input as a version value, failing provisioning. These pinned jobs disable package installation, so installer validation does not guard this path, and the pinned-version comparison runs only afterward. Pass the requested version through an environment variable and validate numeric version syntax before selection.

# The .NET 12 Apple workloads require Xcode 27.1. Agents without it fall back to Xcode_27.app (27.0)
# during "Select Xcode Version", so keep validation off until every image has Xcode 27.1.
- name: ValidateXcodeVersion
value: false

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.

[moderate] Build & MSBuild - Public agents without Xcode 27.1 select the Xcode_27.app fallback (27.0) in provision.yml, but the pinned .NET 12 iOS workload requires the iOS 27.1 compilation SDK. The compatible Xcode package is installed only for internal jobs. Disabling validation and downloading simulator runtimes matching the fallback cannot supply the missing compilation SDK/APIs, leaving current-framework Apple builds blocked on these agents. Provision a compatible public compilation toolchain while preserving the explicit previous-framework and UI-execution pins.

{
public SwitchHoverResourceState(ResourceDictionary ownerResources) => OwnerResources = ownerResources;

public ResourceDictionary OwnerResources { get; }

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.

[moderate] Memory Leak Prevention - Apply a non-null TrackColor to an on-switch, then replace ToggleSwitch.Resources and leave TrackColor unchanged. The live switch's ConditionalWeakTable value still strongly retains the discarded dictionary through OwnerResources, including its application resources. Cleanup only runs on a subsequent on-state TrackColor update, so replacing Resources alone never releases these obsolete objects while the switch remains alive. Release the old state when Resources changes and add a WeakReference collection test without a subsequent TrackColor update; CustomOnColorPreservesReplacedResources immediately performs that update and misses this retention path.

ALREADY_DOWNLOADED=1
fi
rm -f "$DOWNLOAD_LOG"
RUNTIME_READY=0

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.

[moderate] Regression Prevention and Test Coverage - The simulator-recovery fix lacks a discriminating regression fixture: exit 70 with "is already downloaded." and a create-usable plain runtime must avoid deleting installed runtimes. Contrast this with a device-specific runtime of the same version and a plain runtime whose device creation fails, neither of which may count as ready. .github/scripts/Review-PR.Tests.ps1 stops its download fixture before this recovery decision, and its final runtime-count cases omit device-specific identifiers. The new C# selector tests do not exercise this YAML branch. Add isolated command fixtures asserting the recovery decision and exact runtime identifier.

# back to an older Xcode when the pinned one is missing; that Xcode has no device types
# for the pinned runtime, so match the selected Xcode's simulator SDK instead.
XCODE_MAJOR_MINOR="$(XCODE)"
SELECTED_SDK_VERSION=$(xcrun --sdk iphonesimulator --show-sdk-version 2>/dev/null)

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.

[moderate] Regression Prevention and Test Coverage - The selected-SDK fallback fix has no fixture for requested Xcode 27.1 falling back to an installed Xcode whose simulator SDK is 27.0. The architecture fixtures in .github/scripts/Review-PR.Tests.ps1 inject MAJOR/MINOR directly and extract code beginning at RUNTIME_ARCHITECTURE, bypassing this selection; deleting the fix leaves those fixtures unchanged. Add isolated fixtures contrasting mismatched and matching versions, asserting the resulting download arguments and required runtime identifier.

# resolve the raw framework-dependent binary there (e.g. Homebrew's
# libexec/pwsh) instead of the agent's entry point, and it fails when
# DOTNET_ROOT lacks its runtime. Keep $PSHOME, but last.
$pathEntries = $env:PATH -split ':' | Where-Object { $_ }

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.

[moderate] Regression Prevention and Test Coverage - The PATH-ordering fix has no regression fixture with the triggering leading Homebrew PSHOME entry. A host without that competing entry cannot detect reintroducing selection of the raw libexec/pwsh instead of the wrapper, which prevents subsequent test steps from starting. Add an isolated PATH fixture asserting repo dotnet first, the wrapper directory before PSHOME, and preservation of unrelated entries; contrast a PATH without PSHOME to verify the conditional does not introduce it.

if ($env:UI_TEST_PLATFORM) {
$buildArguments += "--$env:UI_TEST_PLATFORM"
}
$extraCakeArguments = ConvertFrom-Json -InputObject $env:UI_TEST_CAKE_ARGS -NoEnumerate

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.

[moderate] Regression Prevention and Test Coverage - The argument-array change and its new rejection guards have no discriminating fixture. The only nonempty caller supplies --ios and --catalyst, so it cannot detect argument splitting for an option such as --nugetsource=/tmp/NuGet Cache. Add an isolated fixture capturing arguments received by a stub build.ps1 and asserting that this option remains one unchanged argument. Contrast accepted empty/single-item string arrays with rejected scalar and non-string inputs so the guards cannot silently reject valid callers.

Keep .NET 12 dependency versions. Combine dotnet#40305's selected-platform UI test
builds with the separate Android CoreCLR sample build: the shared stage builds
only the selected iOS/Mac Catalyst platforms, and the Android stage runs only
when Android is selected.

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

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@kubaflo

This comment has been minimized.

@kubaflo

kubaflo commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Local .NET 12 smoke test after merging main

Head 74fa027c87 merges origin/main (#40305, OneLoc, #40407) into this branch. The PR targets main and contains every net11 commit: 0 behind main, 0 behind net11. This PR's .NET 12 global.json, Versions.props and Version.Details.xml are kept. #40305's per-platform UI-test build selection is combined with this PR's separate Android build stage.

The Sandbox app was built locally with SDK 12.0.100-alpha.1.26523.103 (Debug, CoreCLR). Its page was temporarily filled with a label, button, entry, switch, slider and CollectionView; that change is not committed. On every platform the app launched without crashing and all controls rendered.

Platform Workload Device Result
Android 37.99.0-preview.1.358 Emulator API 36 (Android 16) ✅ 0 errors; launched as the top resumed activity with no FATAL EXCEPTION; button tap updated its text (Tapped 1)
iOS 27.1.12089-net12-p1 (Xcode 27.1) iOS 27.1 simulator ✅ 0 errors; launched and running
Mac Catalyst 27.0.13384-net12-p1 (Xcode 27.1) macOS, maccatalyst-arm64 ✅ 0 errors; launched and running; no crash reports

On every platform the app reported .NET 12.0.0-alpha.1.26523.103 and MAUI 12.0.0.0.

CI was triggered on this head: maui-pr 1691847, uitests 1691848, devicetests 1691849. Results will follow.

@github-actions github-actions Bot 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.

Expert Review — 7 findings

Reviewed commit 74fa027.

Source assessment incomplete (11/13 dimensions); finding count is partial.

See inline comments for details.

# Tools such as Cake target net10.0; let them run on the repo's .NET 12 preview runtime when
# no .NET 10 runtime is installed (their own roll-forward setting skips prerelease runtimes).
- name: DOTNET_ROLL_FORWARD
value: Major

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.

[major] Logic and Correctness Verification - DOTNET_ROLL_FORWARD=Major still excludes prerelease runtimes for release-targeted tools. The Windows device-test stage provisions .dotnet, prepends it to PATH, then invokes net10.0 Cake for both unpackaged and packaged builds. src/DotNet/DotNet.csproj deletes and recreates that isolated installation with the pinned .NET 12 alpha SDK/runtime; a stable runtime in the system installation does not satisfy this root. Cake therefore fails framework resolution before building the apps. Enable prerelease roll-forward for these invocations or install a compatible stable runtime into their selected root.

Comment thread eng/pipelines/ci.yml
- ImageOverride -equals 1ESPT-Ubuntu22.04

# The .NET 11 iOS compatibility workload recommends Xcode 27.0.
- name: previousXcodeVersion

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.

[major] Input and Path Correctness - The unrestricted previousXcodeVersion parameter flows through job.xcodeVersion into XCODE in stage-integration-tests.yml, then Azure substitutes it into executable Bash at XCODE_MAJOR_MINOR=$(XCODE) in common/provision.yml:178. A value such as 27.0 beta makes Bash execute beta instead of treating the input as a version, failing provisioning. The sink predates this PR, but this parameter newly connects caller-supplied text to it. Explicitly pinned jobs disable package installation, and the pinned-version comparison runs after this sink. Pass the value through an environment variable and validate numeric version syntax before selection.

{
public SwitchHoverResourceState(ResourceDictionary ownerResources) => OwnerResources = ownerResources;

public ResourceDictionary OwnerResources { get; }

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.

[moderate] Memory Leak Prevention - Apply a non-null TrackColor to an on-switch, then replace ToggleSwitch.Resources and leave TrackColor unchanged. The live switch now strongly retains the discarded dictionary and its application resources through the ConditionalWeakTable value and OwnerResources. Replacement cleanup only runs on a subsequent on-state TrackColor update, so the obsolete graph remains retained while the switch stays alive. Release the old state when Resources changes while preserving wrapper retention for the active dictionary. Add a collection test without a subsequent color update; CustomOnColorPreservesReplacedResources immediately updates TrackColor and misses this path.

- catalyst
skipProvisioning: ${{ parameters.skipProvisioning }}

- ${{ if and(containsValue(parameters.selectedPlatforms, 'android'), or(eq(length(parameters.selectedCategories), 0), and(not(contains(join(',', parameters.selectedCategories), ':')), ne(join('', parameters.selectedCategories), 'Material3')), contains(replace(join(',', parameters.selectedCategories), 'android:Material3', ''), 'android:'))) }}:

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.

[moderate] Regression Prevention and Test Coverage - The separate Android build guard increases the plain-category guard expression count from 10 to 11, but handles qualified selections in every stage guard, including the dedicated lanes in .github/scripts/RunTests.Tests.ps1:431 still asserts exactly 10. This change therefore breaks the existing contract test regardless of the selected platforms. Update that test alongside the split, preferably checking the required guards individually.

} elseif ($env:UI_TEST_PLATFORM) {
$buildArguments += "--$env:UI_TEST_PLATFORM"
}
$extraCakeArguments = ConvertFrom-Json -InputObject $env:UI_TEST_CAKE_ARGS -NoEnumerate

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.

[moderate] Regression Prevention and Test Coverage - The argument-array fix has no regression fixture proving that an option containing spaces survives unchanged. Current callers leave cakeArgs empty, and the existing pipeline tests only inspect platform interpolation, so they cannot detect reintroduced expression parsing or argument splitting. Add an isolated fixture capturing arguments received by a stub build.ps1, proving that --nugetsource=/tmp/NuGet Cache remains one argument. Exercise accepted empty/single-item string arrays and rejected scalar/non-string inputs to cover the new guards.

# resolve the raw framework-dependent binary there (e.g. Homebrew's
# libexec/pwsh) instead of the agent's entry point, and it fails when
# DOTNET_ROOT lacks its runtime. Keep $PSHOME, but last.
$pathEntries = $env:PATH -split ':' | Where-Object { $_ }

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.

[moderate] Regression Prevention and Test Coverage - The PATH-ordering fix lacks a regression fixture with the triggering leading Homebrew $PSHOME entry. A host without that competing entry cannot detect reintroduced selection of raw libexec/pwsh instead of the wrapper, which prevents subsequent steps from starting. Add an isolated PATH fixture asserting repository dotnet first, the wrapper directory before $PSHOME, and preservation of unrelated entries. Also cover PATH without $PSHOME so the conditional cannot introduce it unexpectedly.

# back to an older Xcode when the pinned one is missing; that Xcode has no device types
# for the pinned runtime, so match the selected Xcode's simulator SDK instead.
XCODE_MAJOR_MINOR="$(XCODE)"
SELECTED_SDK_VERSION=$(xcrun --sdk iphonesimulator --show-sdk-version 2>/dev/null)

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.

[moderate] Regression Prevention and Test Coverage - The selected-SDK fallback fix has no fixture for requested Xcode 27.1 falling back to an installed Xcode with simulator SDK 27.0. The architecture fixtures in .github/scripts/Review-PR.Tests.ps1:1002 inject MAJOR/MINOR directly and extract code beginning at RUNTIME_ARCHITECTURE, bypassing this selection; deleting the fix leaves those fixtures unchanged. Add mismatched and matching version fixtures asserting the resulting download arguments and required runtime identifier. The C# runtime-selection tests exercise a different selector.

@MauiBot

This comment has been minimized.

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot 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.

Expert Review — 9 findings

Reviewed commit 74fa027.

See inline comments for details.

Previously reported findings were not duplicated.

# Tools such as Cake target net10.0; let them run on the repo's .NET 12 preview runtime when
# no .NET 10 runtime is installed (their own roll-forward setting skips prerelease runtimes).
- name: DOTNET_ROLL_FORWARD
value: Major

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.

[major] Logic and Correctness Verification - DOTNET_ROLL_FORWARD=Major permits crossing major versions but does not let release-targeted tools select prerelease runtimes. The Windows device-test stage provisions .dotnet, prepends it to PATH, then invokes net10.0 Cake for unpackaged and packaged builds. src/DotNet/DotNet.csproj deletes and recreates that isolated root with the pinned .NET 12 alpha SDK/runtime, so Cake still fails framework resolution when no stable runtime exists there. A stable runtime in another installation does not satisfy this host. Enable prerelease roll-forward for these invocations or install a compatible stable runtime into their selected root.

Comment thread eng/pipelines/ci.yml
- ImageOverride -equals 1ESPT-Ubuntu22.04

# The .NET 11 iOS compatibility workload recommends Xcode 27.0.
- name: previousXcodeVersion

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.

[major] Input and Path Correctness - The unrestricted previousXcodeVersion parameter flows through job.xcodeVersion into XCODE in stage-integration-tests.yml, then Azure substitutes it into executable Bash at XCODE_MAJOR_MINOR=$(XCODE) in common/provision.yml:178. A value such as 27.0 beta makes Bash attempt to execute beta instead of assigning one version value, failing provisioning under set -e. These pinned jobs disable package installation, so installer metadata validation does not guard this path; the pinned-version comparison runs afterward. The sink predates this PR, but the new parameter connects caller-supplied text to it. Pass the value through an environment variable and validate numeric version syntax before selection.

{
public SwitchHoverResourceState(ResourceDictionary ownerResources) => OwnerResources = ownerResources;

public ResourceDictionary OwnerResources { get; }

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.

[moderate] Memory Leak Prevention - Apply a non-null TrackColor to an on-switch, then replace ToggleSwitch.Resources without another on-state TrackColor update. The live switch's ConditionalWeakTable value strongly retains the discarded dictionary and its application resources through OwnerResources. Replacement cleanup only runs inside UpdateOnPointerOverResources, so the obsolete resource graph remains uncollectable while the switch stays alive and unchanged. Invalidate the cached owner when Resources changes while preserving wrapper retention for the active dictionary. Add a WeakReference collection test without recoloring; CustomOnColorPreservesReplacedResources immediately updates TrackColor and misses this path.

- catalyst
skipProvisioning: ${{ parameters.skipProvisioning }}

- ${{ if and(containsValue(parameters.selectedPlatforms, 'android'), or(eq(length(parameters.selectedCategories), 0), and(not(contains(join(',', parameters.selectedCategories), ':')), ne(join('', parameters.selectedCategories), 'Material3')), contains(replace(join(',', parameters.selectedCategories), 'android:Material3', ''), 'android:'))) }}:

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.

[moderate] Logic and Correctness Verification - Adding the separate Android build guard increases the number of plain-category guard expressions from 10 to 11, but .github/scripts/RunTests.Tests.ps1:431 still asserts exactly 10 in handles qualified selections in every stage guard, including the dedicated lanes. That existing contract test therefore fails against this template regardless of the selected platforms. Update the assertion with the split, preferably checking the required guards individually rather than fixing their total count.

} elseif ($env:UI_TEST_PLATFORM) {
$buildArguments += "--$env:UI_TEST_PLATFORM"
}
$extraCakeArguments = ConvertFrom-Json -InputObject $env:UI_TEST_CAKE_ARGS -NoEnumerate

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.

[moderate] Regression Prevention and Test Coverage - The argument-array fix has no discriminating regression fixture for an option containing spaces. Current callers leave cakeArgs empty, and the existing pipeline test only checks platform interpolation, so it cannot detect reintroduced expression parsing or argument splitting. Add an isolated fixture capturing arguments received by a stub build.ps1, proving that --nugetsource=/tmp/NuGet Cache remains one unchanged argument. Include accepted empty/single-item string arrays and rejected scalar/non-string inputs to cover the new guards.

# libexec/pwsh) instead of the agent's entry point, and it fails when
# DOTNET_ROOT lacks its runtime. Keep $PSHOME, but last.
$pathEntries = $env:PATH -split ':' | Where-Object { $_ }
$otherEntries = @($pathEntries | Where-Object { $_.TrimEnd('/') -ne $PSHOME.TrimEnd('/') })

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.

[moderate] Regression Prevention and Test Coverage - The PATH-ordering fix lacks a regression fixture with the triggering leading Homebrew PSHOME entry. A host without that competing entry cannot detect reintroduced selection of raw libexec/pwsh instead of the wrapper, which prevents subsequent steps from starting. Add an isolated PATH fixture asserting repository dotnet first, the wrapper directory before PSHOME, and preservation of unrelated entries. Also cover PATH without PSHOME so the conditional cannot introduce it unexpectedly.

# The .NET 12 Apple workloads require Xcode 27.1. Agents without it fall back to Xcode_27.app (27.0)
# during "Select Xcode Version", so keep validation off until every image has Xcode 27.1.
- name: ValidateXcodeVersion
value: false

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.

[moderate] Build & MSBuild - On public agents without Xcode 27.1, provision.yml still selects the Xcode_27.app (27.0) fallback, while the pinned net12 iOS workload requires the iOS 27.1 compilation SDK. The compatible Xcode package is installed only for internal jobs. Disabling validation and downloading simulator runtimes matching the fallback cannot supply the missing compilation SDK/APIs, leaving current-framework Apple compilation blocked on those agents. Provision and select a compatible public compilation toolchain while preserving explicit previous-framework and UI-execution pins.

@@ -1,6 +1,24 @@
{

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.

[minor] Build & MSBuild - This changes a build-generated manifest instead of leaving it build-owned. Microsoft.Maui.Templates.csproj unconditionally enables UpdateCgManifestBeforeBuild, and eng/CgManifest.targets invokes eng/scripts/update-cgmanifest.ps1 to rebuild its registrations from the central versions. The committed Microsoft.Extensions entries say 11.0.0, while their central properties now say 11.0.1, so the template build rewrites this delta again. Remove the generated-file delta and let the existing generation target produce it.

On Mac Catalyst built with Xcode 27.1 the ListView cell re-renders after
the tap, so the held element reference goes stale (StaleElementReference
in 4 of 6 PR attempts, 0 of 10 main/net11 runs). Re-query the buttons and
retry the text and count assertions instead of reusing references.

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

This comment has been minimized.

@kubaflo

This comment has been minimized.

@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

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot 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.

Expert Review — 11 findings

Reviewed commit 7494403.

See inline comments for details.

# Tools such as Cake target net10.0; let them run on the repo's .NET 12 preview runtime when
# no .NET 10 runtime is installed (their own roll-forward setting skips prerelease runtimes).
- name: DOTNET_ROLL_FORWARD
value: Major

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.

[major] Logic and Correctness Verification - DOTNET_ROLL_FORWARD=Major does not allow release-targeted tools to select prerelease runtimes. The Windows device-test stage provisions .dotnet, prepends it to PATH, then invokes net10.0 Cake for packaged/unpackaged builds (stage-device-tests.yml:444-474). DotNet.csproj recreates that isolated installation with only the pinned .NET 12 alpha runtime, so Cake still fails framework resolution. Enable prerelease roll-forward for these invocations or install a compatible stable runtime into that root.

Comment thread eng/pipelines/ci.yml
- ImageOverride -equals 1ESPT-Ubuntu22.04

# The .NET 11 iOS compatibility workload recommends Xcode 27.0.
- name: previousXcodeVersion

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.

[major] Input and Path Correctness - Unrestricted previousXcodeVersion flows through job.xcodeVersion into XCODE (stage-integration-tests.yml:23), then into executable Bash at XCODE_MAJOR_MINOR=$(XCODE) (provision.yml:178). A value such as 27.0 beta makes Bash execute beta rather than assign a version, failing provisioning under set -e. These pinned jobs disable package installation, and the version comparison runs afterward. Pass this value through an environment variable and validate numeric version syntax before selection.

{
public SwitchHoverResourceState(ResourceDictionary ownerResources) => OwnerResources = ownerResources;

public ResourceDictionary OwnerResources { get; }

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.

[moderate] Memory Leak Prevention - After applying an on-state TrackColor, replacing ToggleSwitch.Resources without recoloring leaves the live switch's ConditionalWeakTable value strongly retaining the discarded dictionary and its unrelated resources through OwnerResources. Cleanup runs only during a later on-state TrackColor update, so the obsolete resource graph remains uncollectable while the switch stays unchanged. Invalidate the cached owner on replacement while retaining active wrappers. The replacement test immediately recolors and misses this lifetime.

Comment thread Directory.Build.props

<PropertyGroup>
<_MauiDotNetVersionMajor Condition="'$(_MauiDotNetVersionMajor)' == ''">11</_MauiDotNetVersionMajor>
<_MauiDotNetVersionMajor Condition="'$(_MauiDotNetVersionMajor)' == ''">12</_MauiDotNetVersionMajor>

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.

[moderate] Logic and Correctness Verification - Device-project TFMs now resolve to net12, but eng/pipelines/device-tests.yml:105 still defaults targetFrameworkVersions to net11.0. Its alternate pipeline branch passes that value through device-tests-jobs/steps to Cake's --targetFrameworkVersion, producing, for example, -f net11.0-android against Core/Controls device projects that expose only net12 platform TFMs. Update this entry point's default alongside ci-device-tests.yml so default runs can build their bundles.

- catalyst
skipProvisioning: ${{ parameters.skipProvisioning }}

- ${{ if and(containsValue(parameters.selectedPlatforms, 'android'), or(eq(length(parameters.selectedCategories), 0), and(not(contains(join(',', parameters.selectedCategories), ':')), ne(join('', parameters.selectedCategories), 'Material3')), contains(replace(join(',', parameters.selectedCategories), 'android:Material3', ''), 'android:'))) }}:

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.

[moderate] Logic and Correctness Verification - The separate Android build guard increases the plain-category guard expression count from 10 to 11, but .github/scripts/RunTests.Tests.ps1:431 still asserts exactly 10 in handles qualified selections in every stage guard, including the dedicated lanes. That contract assertion now fails independently of platform selection. Update it alongside the split, preferably checking the required guards individually.

# back to an older Xcode when the pinned one is missing; that Xcode has no device types
# for the pinned runtime, so match the selected Xcode's simulator SDK instead.
XCODE_MAJOR_MINOR="$(XCODE)"
SELECTED_SDK_VERSION=$(xcrun --sdk iphonesimulator --show-sdk-version 2>/dev/null)

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.

[moderate] Regression Prevention and Test Coverage - The selected-SDK fallback fix lacks a fixture where requested Xcode 27.1 falls back to simulator SDK 27.0. Review-PR.Tests.ps1 injects MAJOR/MINOR and extracts code starting at RUNTIME_ARCHITECTURE, bypassing this selection; removing the fix leaves those fixtures unchanged. Add mismatched and matching version cases asserting download arguments and the required runtime identifier. The C# SimulatorRuntimeSelectionTests exercise a different selector.

# resolve the raw framework-dependent binary there (e.g. Homebrew's
# libexec/pwsh) instead of the agent's entry point, and it fails when
# DOTNET_ROOT lacks its runtime. Keep $PSHOME, but last.
$pathEntries = $env:PATH -split ':' | Where-Object { $_ }

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.

[moderate] Regression Prevention and Test Coverage - The PATH-ordering fix lacks a regression fixture with the leading Homebrew PSHOME entry described by pinned commit 26c5bb6. A fixture without that competing entry cannot detect reintroduced selection of raw libexec/pwsh instead of the wrapper, preventing later steps from starting. Assert repository dotnet first, wrapper before PSHOME, and preservation of unrelated entries; also cover PATH without PSHOME so the branch cannot introduce it.

} elseif ($env:UI_TEST_PLATFORM) {
$buildArguments += "--$env:UI_TEST_PLATFORM"
}
$extraCakeArguments = ConvertFrom-Json -InputObject $env:UI_TEST_CAKE_ARGS -NoEnumerate

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.

[moderate] Regression Prevention and Test Coverage - The argument-array fix has no fixture for the reported Cake option containing spaces. Current sample-build callers leave cakeArgs empty, and RunTests.Tests.ps1 checks only platform interpolation, so they cannot detect reintroduced argument splitting. Capture arguments with a stub build.ps1 and assert --nugetsource=/tmp/NuGet Cache remains one argument. Contrast accepted empty/single-item string arrays with rejected scalar/non-string inputs to cover the new guards.

# The .NET 12 Apple workloads require Xcode 27.1. Agents without it fall back to Xcode_27.app (27.0)
# during "Select Xcode Version", so keep validation off until every image has Xcode 27.1.
- name: ValidateXcodeVersion
value: false

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.

[moderate] Build & MSBuild - Public agents without Xcode 27.1 still select the Xcode_27.app (27.0) fallback in provision.yml:220-233, while the net12 iOS workload and Directory.Build.props:165-171 require the iOS 27.1 compilation SDK. The compatible package is installed only for internal jobs. Disabling validation and downloading simulator runtimes for the fallback does not supply the missing compilation SDK, so current-framework Apple compilation remains blocked on those agents. Provision a compatible public compilation toolchain while preserving explicit previous-framework/UI execution pins.

"nuget": {
"name": "Microsoft.Extensions.Configuration",
"version": "10.0.0"
"version": "11.0.0"

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.

[minor] Build & MSBuild - This commits a generated manifest delta that is already stale: Microsoft.Extensions registrations say 11.0.0, while their central properties in eng/Versions.props:47-56 say 11.0.1. Microsoft.Maui.Templates.csproj enables UpdateCgManifestBeforeBuild, whose existing generator rebuilds these registrations from the central versions; the next template build rewrites the delta. Remove generated-file changes and leave regeneration to the build target.

@MauiBot

This comment has been minimized.

@kubaflo

kubaflo commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

CI summary for 7494403 (merge ref 8cef639)

Pipeline Build Result
maui-pr 1692278 ✅ Succeeded
maui-pr-devicetests 1692290 ⚠️ Only the Windows failures that also fail on baseline runs (Border Issue17523 and the Controls work items). iOS, Android and Mac Catalyst passed.
maui-pr-uitests 1692289 ⚠️ 127 of 134 jobs passed. None of the remaining failures is caused by this PR (see below).

UI test failures after retries (attempt 3):

  • Also fail on baseline runs:
    • Mac Catalyst: Issue38730, Issue7678, Issue7678_1.
    • iOS: Issue17664, Issue19609, Issue31897, Issue9075, and the CarouselView set (ChangePeekAreaInsets, Issue12848, Issue22417, Issue27418, Issue31680, Issue7678).
  • Issue35490 (iOS): The NavigationPageChildContentExtendsUnderFloatingTabBar screenshot differs by 1.66%. The only difference is the tint of the iOS 26 floating glass tab bar. The same test also fails in uitests 1692182 for unrelated PR [NET12][Enhancement] Add opt-in three-state CheckBox support #40383, so this is environmental rather than caused by this PR.
  • Infra failures, cleared on retry: checkout failures ("could not read Username") in about 31 Android API 30 and Windows jobs.
  • Intermittent: Mac Catalyst Issue23902 and Issue21814 passed on retry.

Fixed in this push: Issue2951 (Mac Catalyst) failed in 4 of 6 earlier PR attempts. The test now re-queries the buttons after each tap and uses RetryAssert. It passed in CI here ("Controls Border,BoxView,Brush,Button" on Mac Catalyst) and 3 of 3 times locally on the iOS simulator.

No tests are disabled.

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot 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.

Expert Review — 11 findings

Reviewed commit 7494403.

Source assessment incomplete (11/13 dimensions); finding count is partial.

See inline comments for details.

Previously reported findings were not duplicated.

1 findings could not be attached inline; retained in run artifacts.

# Tools such as Cake target net10.0; let them run on the repo's .NET 12 preview runtime when
# no .NET 10 runtime is installed (their own roll-forward setting skips prerelease runtimes).
- name: DOTNET_ROLL_FORWARD
value: Major

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.

[major] Logic and Correctness Verification - Major-version roll-forward does not permit release-targeted tools to select prerelease runtimes. The Windows device stage provisions and prepends the isolated .dotnet root, then invokes net10.0 Cake for packaged and unpackaged builds. src/DotNet/DotNet.csproj recreates that root with the pinned .NET 12 alpha SDK/runtime; a stable system runtime does not populate it. With no stable runtime in that root, Cake fails framework resolution before building. Enable prerelease roll-forward for these invocations or install a compatible stable runtime into their selected root.

Comment thread eng/pipelines/ci.yml
- ImageOverride -equals 1ESPT-Ubuntu22.04

# The .NET 11 iOS compatibility workload recommends Xcode 27.0.
- name: previousXcodeVersion

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.

[major] Input and Path Correctness - The unrestricted previousXcodeVersion parameter flows through job.xcodeVersion into XCODE (stage-integration-tests.yml:23), then Azure substitutes it into executable Bash at XCODE_MAJOR_MINOR=$(XCODE) (common/provision.yml:178). Supplying 27.0 beta makes Bash execute beta rather than assign one version value, failing provisioning under set -e. The new parameter connects caller-supplied text to this existing sink. Pinned jobs disable package installation, and pinned-version verification runs afterward, so neither guards this assignment. Pass the value through an environment variable and validate numeric version syntax before selection.

- catalyst
skipProvisioning: ${{ parameters.skipProvisioning }}

- ${{ if and(containsValue(parameters.selectedPlatforms, 'android'), or(eq(length(parameters.selectedCategories), 0), and(not(contains(join(',', parameters.selectedCategories), ':')), ne(join('', parameters.selectedCategories), 'Material3')), contains(replace(join(',', parameters.selectedCategories), 'android:Material3', ''), 'android:'))) }}:

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.

[moderate] Logic and Correctness Verification - The separate Android build guard increases the number of not(contains(join(',', parameters.selectedCategories), ':')) expressions from 10 to 11, but .github/scripts/RunTests.Tests.ps1:431 still asserts exactly 10 in handles qualified selections in every stage guard, including the dedicated lanes. That contract assertion now fails independently of platform or category selection. Update it with the stage split, preferably checking the required guards individually.


<!-- The current SDK pins {{BaseBuildTest.DotNetPrevious}} ILLink to a pre-release whose API does not
match the custom steps used by previous-.NET Apple SDKs for Mono builds (IL1027). -->
<Target Name="_MauiTestPinPreviousILLinkPack" BeforeTargets="ProcessFrameworkReferences">

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.

[moderate] Build & MSBuild - The previous-framework ILLink override is not imported by the generated template projects. BaseTemplateTests copies src/Templates/tests/Directory.Build.targets into TestDirectory; MSBuild stops at that nearer file, which does not import the fixture-root targets containing this override. The net11 Mono Release cases in AppleTemplateTests therefore do not receive the intended 11.0.0 linker pin, leaving the documented custom-linker-step compatibility fix inactive for those cases. Put the override in the targets actually imported by generated projects.

static internal Point? CalculatePosition(IElement relativeTo, WeakReference viewHandlerRef, WeakReference sessionRef)
{
if (sessionRef is null)
if (sessionRef?.Target is not IUIDragDropSession session)

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.

[moderate] Regression Prevention and Test Coverage - The collected-target guard has no discriminating regression test. DragPositionIsAvailableAfterGarbageCollectionDuringHandler queries GetPosition while KeepAlive protects the session; DragOverPositionIsNullWithoutLocalDragSession supplies a null sessionRef. Both still succeed if only this guard is reverted to the reference-only check, although saved event args queried after the local session is collected would again dereference null. Add an iOS/MacCatalyst case with a non-null WeakReference whose target has been collected and assert GetPosition returns null.

} elseif ($env:UI_TEST_PLATFORM) {
$buildArguments += "--$env:UI_TEST_PLATFORM"
}
$extraCakeArguments = ConvertFrom-Json -InputObject $env:UI_TEST_CAKE_ARGS -NoEnumerate

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.

[moderate] Regression Prevention and Test Coverage - The argument-array fix has no regression fixture for a Cake option containing spaces. Current sample-build callers leave cakeArgs empty, and RunTests.Tests.ps1 checks only platform interpolation, so neither detects reintroduced expression parsing or argument splitting. Capture arguments with a stub build.ps1 and assert --nugetsource=/tmp/NuGet Cache remains one unchanged argument. Contrast accepted empty/single-item string arrays with rejected scalar/non-string inputs to exercise the new guards.

# resolve the raw framework-dependent binary there (e.g. Homebrew's
# libexec/pwsh) instead of the agent's entry point, and it fails when
# DOTNET_ROOT lacks its runtime. Keep $PSHOME, but last.
$pathEntries = $env:PATH -split ':' | Where-Object { $_ }

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.

[moderate] Regression Prevention and Test Coverage - The PATH-ordering fix lacks a regression fixture with the leading Homebrew PSHOME entry described by pinned commit 26c5bb6. A host without that competing entry cannot detect reintroduced selection of raw libexec/pwsh instead of the wrapper, preventing subsequent steps from starting. Add an isolated PATH fixture asserting repository dotnet first, the wrapper directory before PSHOME, and preservation of unrelated entries; also cover PATH without PSHOME so the conditional cannot introduce it.

# back to an older Xcode when the pinned one is missing; that Xcode has no device types
# for the pinned runtime, so match the selected Xcode's simulator SDK instead.
XCODE_MAJOR_MINOR="$(XCODE)"
SELECTED_SDK_VERSION=$(xcrun --sdk iphonesimulator --show-sdk-version 2>/dev/null)

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.

[moderate] Regression Prevention and Test Coverage - The selected-SDK fallback fix lacks a fixture where requested Xcode 27.1 falls back to simulator SDK 27.0, the scenario documented by pinned commit 150853e. Review-PR.Tests.ps1 injects MAJOR/MINOR and extracts code starting at RUNTIME_ARCHITECTURE, bypassing this selection; deleting the fix leaves those fixtures unchanged. Add mismatched and matching version cases asserting download arguments and the required runtime identifier. The C# SimulatorRuntimeSelectionTests exercise a different selector.

"nuget": {
"name": "Microsoft.Extensions.Configuration",
"version": "10.0.0"
"version": "11.0.0"

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.

[minor] Build & MSBuild - The committed generated manifest records Microsoft.Extensions.Configuration, DependencyInjection and Logging.Debug as 11.0.0, but the pinned Versions.props entries are 11.0.1. update-cgmanifest.ps1 reads those stable values directly and regenerates all three registrations as 11.0.1. The checked-in component inventory describes different package versions from its generator's inputs. Leave this generated file out of the change instead of committing stale registrations.

@MauiBot

MauiBot commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

PR Test Gate

@kubaflo — existing-test verification for commit 74944030.

Result FAILED Platform Android Commit 74944030


🧪 Gate analysis — click to expand

❌ Failed. The selected tests did not meet the expected outcomes. Inspect the evidence before changing the test or fix.

🧪 Unit tests
Test group Without fix With fix
AppThemeBinding ✅ Failed as expected (77s) ⚠ Build blocked
BasicCase ✅ Failed as expected (18s) ⚠ Build blocked
CompiledBindings ✅ Failed as expected (21s) ⚠ Build blocked
CSWarningIgnore ✅ Failed as expected (26s) ⚠ Build blocked
DataTemplateMarkupExtension ✅ Failed as expected (19s) ⚠ Build blocked
FlexLayoutTests ✅ Failed as expected (18s) ⚠ Build blocked
Maui32758Tests ✅ Failed as expected (19s) ⚠ Build blocked
Maui32879Tests ✅ Failed as expected (18s) ⚠ Build blocked
SetBinding ✅ Failed as expected (19s) ⚠ Build blocked
SetterCompiledConverters ✅ Failed as expected (18s) ⚠ Build blocked
SimpleValueTargetProviderTests ✅ Failed as expected (17s) ⚠ Build blocked
SimplifyOnPlatform ✅ Failed as expected (19s) ⚠ Build blocked
StaticResourceInMarkup ✅ Failed as expected (18s) ⚠ Build blocked
StaticResourceWithTypeConversion ✅ Failed as expected (23s) ⚠ Build blocked
UnresolvedType ✅ Failed as expected (28s) ⚠ Build blocked
XStaticUnresolvedType ✅ Failed as expected (27s) ⚠ Build blocked
📄 XAML unit tests
Test group Without fix With fix
AssemblyInfoTests ✅ Failed as expected (103s) ⚠ Build blocked
📱 Device tests
Test group Without fix With fix
InputMethodManagerTests (InputMethodServiceRemainsUsable) ⚠ Environment blocked ⚠ Build blocked
🖥 UI tests
Test group Without fix With fix
Issue28986 ⚠ Snapshot baseline missing ⚠ Build blocked
Issue28986_ContentPage ⚠ Passed without the fix (1398s) ⚠ Build blocked

Coverage gap: some detected groups were omitted by the verifier. Inspect the complete report before treating this as full coverage.

Execution log excerpts

Without fix AppThemeBinding

     at Microsoft.Maui.Controls.SourceGen.UnitTests.AppThemeBinding.AppThemeBindingWithAllThree() in /_/src/Controls/tests/SourceGen.UnitTests/InitializeComponent/AppThemeBinding.cs:line 329
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
     at Microsoft.Maui.Controls.SourceGen.UnitTests.AppThemeBinding.AppThemeBindingWithDefault() in /_/src/Controls/tests/SourceGen.UnitTests/InitializeComponent/AppThemeBinding.cs:line 220
     at Microsoft.Maui.Controls.SourceGen.UnitTests.AppThemeBinding.AppThemeBindingWithLightAndDark() in /_/src/Controls/tests/SourceGen.UnitTests/InitializeComponent/AppThemeBinding.cs:line 114

With fix AppThemeBinding

/home/vsts/work/1/s/.dotnet/sdk/11.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(195,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 12.0.  Either target .NET 11.0 or lower, or use a version of the .NET SDK that supports .NET 12.0. Download the .NET SDK from https://aka.ms/dotnet/download [/home/vsts/work/1/s/src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj]

Without fix BasicCase

     at Microsoft.Maui.Controls.SourceGen.UnitTests.BasicCase.BasicXaml() in /_/src/Controls/tests/SourceGen.UnitTests/InitializeComponent/BasicCase.cs:line 120
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

With fix BasicCase

/home/vsts/work/1/s/.dotnet/sdk/11.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(195,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 12.0.  Either target .NET 11.0 or lower, or use a version of the .NET SDK that supports .NET 12.0. Download the .NET SDK from https://aka.ms/dotnet/download [/home/vsts/work/1/s/src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj]

PR head: 74944030.

Without-fix baseline: f79bb5b3.

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.

🟡 Changes recommended

Release-targeted tools still cannot start with only the .NET 12 alpha runtime installed, and iOS Mono device-test coverage is removed without restoration or explicit follow-up.

2 open issues
What changed in this PR

Moves MAUI’s main branch to .NET 12 while retaining .NET 11 compatibility testing. The migration updates build infrastructure, adapts platform code to runtime changes, and refreshes tests and documentation.

Changes:

  • Updates SDK, workload, framework, assembly-version, and package-feed settings.
  • Separates Android and Apple test builds and adjusts toolchain provisioning and runtime coverage.
  • Fixes platform object-lifetime issues and adds regression tests.
File Description
src/​TestUtils/​src/​Microsoft.Maui.IntegrationTests/​Utilities/​TestEnvironment.cs Uses the ARM64 iOS simulator runtime identifier.
src/​TestUtils/​src/​Microsoft.Maui.IntegrationTests/​SimulatorRuntimeSelectionTests.cs Tests simulator runtime compatibility selection.
src/​TestUtils/​src/​Microsoft.Maui.IntegrationTests/​SimpleTemplateTest.cs Enables template cases and verifies package-version overrides.
src/​TestUtils/​src/​Microsoft.Maui.IntegrationTests/​SampleTests.cs Removes a blank line only.
src/​TestUtils/​src/​Microsoft.Maui.IntegrationTests/​ResizetizerTests.cs Retargets generated libraries and updates SDK detection.
src/​TestUtils/​src/​Microsoft.Maui.IntegrationTests/​PackageSourceTests.cs Tests package-source deduplication and conflicts.
src/​TestUtils/​src/​Microsoft.Maui.IntegrationTests/​MultiProjectTemplateTest.cs Enables Avalonia template tests.
src/​TestUtils/​src/​Microsoft.Maui.IntegrationTests/​MacTemplateTest.cs Enables Mac Catalyst signing and entitlement tests.
src/​TestUtils/​src/​Microsoft.Maui.IntegrationTests/​BaseTemplateTests.cs Deduplicates package sources.
src/​TestUtils/​src/​Microsoft.Maui.IntegrationTests/​BaseBuildTest.cs Updates framework constants, linker pinning, and keystore isolation.
src/​TestUtils/​src/​Microsoft.Maui.IntegrationTests/​AppleTemplateTests.cs Adjusts current and previous-framework runtime cases.
src/​TestUtils/​src/​Microsoft.Maui.IntegrationTests/​Apple/​Simulator.cs Filters runtimes by supported simulator device type.
src/​TestUtils/​src/​Microsoft.Maui.IntegrationTests/​AOTTemplateTest.cs Uses .NET 11 for simulator-x64 compatibility cases.
src/​TestUtils/​src/​DeviceTests/​AssertionExtensions.cs Allows time for Android CoreCLR peer cleanup.
src/​TestUtils/​src/​DeviceTests.Runners/​HeadlessRunner/​iOS/​XHarnessSceneManifest.plist Adds the headless runner’s scene manifest.
src/​TestUtils/​src/​DeviceTests.Runners/​HeadlessRunner/​iOS/​XHarnessSceneDelegate.cs Registers the headless runner’s scene delegate.
src/​Templates/​src/​cgmanifest.json Refreshes generated dependency registrations.
src/​Microsoft.Maui.TestUtils.DeviceTests.Runners.targets Conditionally includes the scene manifest.
src/​Graphics/​tests/​DeviceTests/​Graphics.DeviceTests.csproj Enables the XHarness scene manifest.
src/​Essentials/​src/​FileSystem/​FileSystem.android.cs Preserves Java file-not-found exception constructors.
src/​DotNet/​Dependencies/​Workloads.csproj Moves compatibility manifests from net10 to net11.
src/​Core/​tests/​DeviceTests/​Platform/​InputMethodManagerTests.Android.cs Tests shared input-service lifetime.
src/​Core/​tests/​DeviceTests/​Handlers/​Switch/​SwitchHandlerTests.Windows.cs Tests resource lifetime and replacement handling.
src/​Core/​tests/​DeviceTests/​Core.DeviceTests.csproj Enables the XHarness scene manifest.
src/​Core/​src/​PublicAPI/​net-android/​PublicAPI.Unshipped.txt Records removed Android threshold overrides.
src/​Core/​src/​Platform/​Windows/​SwitchExtensions.cs Retains hover-resource state with the control.
src/​Core/​src/​Platform/​Android/​ViewExtensions.cs Uses Java casting and preserves shared input services.
src/​Core/​src/​Platform/​Android/​SearchViewExtensions.cs Uses Java casting for the input service.
src/​Core/​src/​Platform/​Android/​MauiHybridWebViewClient.cs Preserves Java file-not-found exception constructors.
src/​Core/​src/​Platform/​Android/​EditTextExtensions.cs Uses Java casting for the input service.
src/​Controls/​tests/​Xaml.UnitTests/​AssemblyInfoTests.cs Expects assembly major version 12.
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​XFIssue/​Issue2951.cs Retries assertions after cell updates.
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue28986.cs Adjusts Android keyboard dismissal.
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue28986_ContentPage.cs Adjusts Android keyboard dismissal.
src/​Controls/​tests/​TestCases.HostApp/​Controls.TestCases.HostApp.csproj Restricts current-framework iOS builds to ARM64.
src/​Controls/​tests/​SourceGen.UnitTests/​StaticResourceInMarkup.cs Updates assembly-version snapshots.
src/​Controls/​tests/​SourceGen.UnitTests/​Maui32879Tests.cs Updates assembly-version snapshots.
src/​Controls/​tests/​SourceGen.UnitTests/​InitializeComponent/​XStaticUnresolvedType.cs Updates assembly-version snapshots.
src/​Controls/​tests/​SourceGen.UnitTests/​InitializeComponent/​WarningIgnore.cs Updates assembly-version snapshots.
src/​Controls/​tests/​SourceGen.UnitTests/​InitializeComponent/​UnresolvedType.cs Updates assembly-version snapshots.
src/​Controls/​tests/​SourceGen.UnitTests/​InitializeComponent/​StaticResourceWithTypeConversion.cs Updates assembly-version snapshots.
src/​Controls/​tests/​SourceGen.UnitTests/​InitializeComponent/​SimplifyOnPlatform.cs Updates assembly-version snapshots.
src/​Controls/​tests/​SourceGen.UnitTests/​InitializeComponent/​SimpleValueTargetProviderTests.cs Updates assembly-version snapshots.
src/​Controls/​tests/​SourceGen.UnitTests/​InitializeComponent/​SetterCompiledConverters.cs Updates assembly-version snapshots.
src/​Controls/​tests/​SourceGen.UnitTests/​InitializeComponent/​SetBinding.cs Updates assembly-version snapshots.
src/​Controls/​tests/​SourceGen.UnitTests/​InitializeComponent/​Maui32758Tests.cs Updates assembly-version snapshots.
src/​Controls/​tests/​SourceGen.UnitTests/​InitializeComponent/​DataTemplateMarkupExtension.cs Updates assembly-version snapshots.
src/​Controls/​tests/​SourceGen.UnitTests/​InitializeComponent/​CompiledBindings.cs Updates assembly-version snapshots.
src/​Controls/​tests/​SourceGen.UnitTests/​InitializeComponent/​BasicCase.cs Updates assembly-version snapshots.
src/​Controls/​tests/​SourceGen.UnitTests/​InitializeComponent/​AppThemeBinding.cs Updates assembly-version snapshots.
src/​Controls/​tests/​SourceGen.UnitTests/​FlexLayoutTests.cs Updates assembly-version snapshots.
src/​Controls/​tests/​DeviceTests/​Elements/​DragAndDrop/​DragAndDropTests.iOS.cs Tests drag-session lifetime and missing-session behavior.
src/​Controls/​tests/​DeviceTests/​Controls.DeviceTests.csproj Enables the XHarness scene manifest.
src/​Controls/​src/​Core/​Platform/​iOS/​DragAndDropDelegate.cs Keeps drag sessions alive during event handlers.
src/​BlazorWebView/​tests/​DeviceTests/​MauiBlazorWebView.DeviceTests.csproj Enables the XHarness scene manifest.
NuGet.config Adds .NET 12 and Apple compatibility feeds.
global.json Selects the .NET 12 alpha SDK.
eng/​Versions.props Updates product, SDK, workload, and JDK versions.
eng/​Version.Details.xml Updates dependency versions and coherent-parent metadata.
eng/​pipelines/​device-tests.yml Adds Android-specific provisioning steps.
eng/​pipelines/​common/​variables.yml Updates Xcode defaults and runtime roll-forward settings.
eng/​pipelines/​common/​ui-tests.yml Separates Android sample builds and propagates Xcode pins.
eng/​pipelines/​common/​ui-tests-steps.yml Parameterizes artifacts and pinned Xcode handling.
eng/​pipelines/​common/​ui-tests-build-sample.yml Passes build arguments safely and parameterizes artifacts.
eng/​pipelines/​common/​run-dotnet-preview.yml Adjusts PATH ordering for PowerShell startup.
eng/​pipelines/​common/​provision.yml Matches simulator provisioning to Xcode and retries JDK downloads.
eng/​pipelines/​ci.yml Reorganizes compatibility partitions and Apple test jobs.
eng/​pipelines/​ci-device-tests.yml Targets net12 and adds Android provisioning.
eng/​pipelines/​arcade/​stage-device-tests.yml Separates platform builds and adds workload diagnostics.
eng/​helix.proj Aligns test publishing with the repository framework.
eng/​devices/​devices-shared.cake Defaults device tooling to net12.
eng/​cake/​dotnet.cake Defaults to net12 and ARM64 iOS NativeAOT builds.
eng/​Build.props Clarifies restore isolation in a comment.
docs/​DevelopmentTips.md Documents Apple toolchains and compatibility coverage.
Directory.Build.props Updates frameworks, isolates restores, and adjusts Apple settings.
.github/​skills/​run-integration-tests/​SKILL.md Updates iOS test invocation examples.
.github/​instructions/​integration-tests.instructions.md Refreshes framework, CI, and toolchain guidance.

Review effort: Balanced

Comment on lines +25 to +26
- name: DOTNET_ROLL_FORWARD
value: Major
Comment on lines +189 to +190
- script: $(_buildScriptMacOS) -restore -build -configuration $(_BuildConfig) /p:BuildDeviceTests=true /p:UseMonoRuntime=false /p:IncludeIosTargetFrameworks=false /p:IncludeMacCatalystTargetFrameworks=false /bl:BuildDeviceTests.binlog
displayName: Build DeviceTests Android (CoreCLR)
@kubaflo

kubaflo commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

/review expert-review-with-gate

@github-actions

Copy link
Copy Markdown
Contributor

Warning

Your /review gate couldn't start due to a transient error triggering the pipeline. The command was left unacknowledged so scheduled recovery can retry it automatically; you can also comment /review gate again in a minute.

@github-actions github-actions Bot 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.

Expert Review — 12 findings

Reviewed commit 7494403.

Source assessment incomplete (11/13 dimensions); finding count is partial.

See inline comments for details.

1 findings could not be attached inline; retained in run artifacts.

# Tools such as Cake target net10.0; let them run on the repo's .NET 12 preview runtime when
# no .NET 10 runtime is installed (their own roll-forward setting skips prerelease runtimes).
- name: DOTNET_ROLL_FORWARD
value: Major

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.

[major] Logic and Correctness Verification - DOTNET_ROLL_FORWARD=Major does not allow release-targeted tools to select prerelease runtimes. The Windows device-test stage provisions .dotnet, prepends it to PATH, then invokes net10 Cake for unpackaged and packaged builds. DotNet.csproj deletes and recreates that root with the pinned .NET 12 alpha SDK/runtime, so Cake cannot resolve its framework when that root has no stable runtime; the system installation does not satisfy this isolated host. Enable DOTNET_ROLL_FORWARD_TO_PRERELEASE=1 for these invocations or install a compatible stable runtime in their selected root.

Comment thread eng/pipelines/ci.yml
- ImageOverride -equals 1ESPT-Ubuntu22.04

# The .NET 11 iOS compatibility workload recommends Xcode 27.0.
- name: previousXcodeVersion

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.

[major] Input and Path Correctness - The unrestricted previousXcodeVersion parameter flows through job.xcodeVersion into XCODE (stage-integration-tests.yml:23), then Azure substitutes it into executable Bash at XCODE_MAJOR_MINOR=$(XCODE) (common/provision.yml:178). A value such as 27.0 beta makes Bash attempt to execute beta instead of assigning one version value, failing provisioning under set -e. These pinned jobs disable package installation, and version verification occurs afterward, so neither guards this assignment. Pass the parameter through an environment variable and validate numeric version syntax before selection.

{
public SwitchHoverResourceState(ResourceDictionary ownerResources) => OwnerResources = ownerResources;

public ResourceDictionary OwnerResources { get; }

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.

[moderate] Memory Leak Prevention - Apply a non-null TrackColor to an on-switch, then replace ToggleSwitch.Resources without recoloring. The live switch's ConditionalWeakTable value still strongly retains the discarded dictionary and its unrelated application resources through OwnerResources. Replacement cleanup runs only during a subsequent on-state TrackColor update, so the obsolete resource graph remains retained while the switch stays unchanged. Release the old owner when Resources changes while preserving active-wrapper retention. CustomOnColorPreservesReplacedResources immediately recolors; add a WeakReference collection case without that update.

- catalyst
skipProvisioning: ${{ parameters.skipProvisioning }}

- ${{ if and(containsValue(parameters.selectedPlatforms, 'android'), or(eq(length(parameters.selectedCategories), 0), and(not(contains(join(',', parameters.selectedCategories), ':')), ne(join('', parameters.selectedCategories), 'Material3')), contains(replace(join(',', parameters.selectedCategories), 'android:Material3', ''), 'android:'))) }}:

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.

[moderate] Regression Prevention and Test Coverage - The Android build-stage split adds an eleventh not(contains(join(',', parameters.selectedCategories), ':')) guard, but the existing qualified-selection contract in .github/scripts/RunTests.Tests.ps1:431 still asserts exactly ten occurrences. The assertion therefore fails against this template regardless of platform or category selection. Update the contract alongside the split, preferably checking the required guards individually.

static internal Point? CalculatePosition(IElement relativeTo, WeakReference viewHandlerRef, WeakReference sessionRef)
{
if (sessionRef is null)
if (sessionRef?.Target is not IUIDragDropSession session)

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.

[moderate] Regression Prevention and Test Coverage - The collected-session guard has no discriminating regression case. DragPositionIsAvailableAfterGarbageCollectionDuringHandler queries GetPosition while KeepAlive protects the session; DragOverPositionIsNullWithoutLocalDragSession supplies a null sessionRef. Both still succeed if only this guard is reverted to the old reference-only check, while saved event args queried after the local session is collected would dereference null again. Add an iOS/MacCatalyst case with a non-null WeakReference whose target has been collected and assert GetPosition returns null.

$buildArguments += "--$env:UI_TEST_PLATFORM"
}
$extraCakeArguments = ConvertFrom-Json -InputObject $env:UI_TEST_CAKE_ARGS -NoEnumerate
if ($extraCakeArguments -isnot [array]) {

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.

[moderate] Regression Prevention and Test Coverage - The argument-array fix has no regression fixture for a Cake option containing spaces. Current sample-build callers leave cakeArgs empty, and RunTests.Tests.ps1 checks platform interpolation rather than argument preservation, so neither detects reintroduced expression parsing or splitting. Capture arguments with an isolated stub build.ps1 and assert --nugetsource=/tmp/NuGet Cache remains one unchanged argument. Include accepted empty/single-item string arrays and rejected scalar/non-string inputs to exercise these guards.

# resolve the raw framework-dependent binary there (e.g. Homebrew's
# libexec/pwsh) instead of the agent's entry point, and it fails when
# DOTNET_ROOT lacks its runtime. Keep $PSHOME, but last.
$pathEntries = $env:PATH -split ':' | Where-Object { $_ }

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.

[moderate] Regression Prevention and Test Coverage - The PATH-ordering fix lacks a regression fixture with the leading Homebrew PSHOME entry described by pinned commit 26c5bb6. Without that competing entry, a fixture cannot detect reintroduced selection of raw libexec/pwsh instead of the wrapper, which prevents later steps from starting when the required runtime is absent from the selected root. Add an isolated PATH case asserting repository dotnet first, the wrapper before PSHOME, and preservation of unrelated entries; also cover PATH without PSHOME.


<!-- The current SDK pins {{BaseBuildTest.DotNetPrevious}} ILLink to a pre-release whose API does not
match the custom steps used by previous-.NET Apple SDKs for Mono builds (IL1027). -->
<Target Name="_MauiTestPinPreviousILLinkPack" BeforeTargets="ProcessFrameworkReferences">

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.

[moderate] Build & MSBuild - The previous-framework ILLink pin is written only to the fixture-root Directory.Build.targets. BaseTemplateTests copies src/Templates/tests/Directory.Build.targets into each generated-project directory; MSBuild stops at that nearer file, which neither imports the parent nor contains this pin. Retained net11 Release SimpleTemplateTest.Build and BuildWithMauiVersion app cases therefore do not receive the workaround for the SDK-default ILLink/custom Apple Mono-step incompatibility described here. Put the pin in the targets these fixtures actually import, or explicitly import a shared pin from both locations.

# Agents don't preinstall JDK 21, so this downloads it; the download host has
# intermittent 504 windows that outlast the task-level retry backoff.
- pwsh: |
foreach ($delay in 0, 30, 60, 120) {

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.

[minor] Complexity Reduction - The four-attempt backoff loop remains wrapped in retryCountOnTaskFailure: 4, multiplying recovery into up to 20 ProvisionJdk invocations and 1,050 seconds of explicit sleeps, excluding command time and Azure backoff, on persistent failures. The longer delay does not require two retry owners. Follow the existing bounded single-owner pattern in eng/scripts/Install-AndroidSdkPackage.ps1: use one five-attempt loop with the longer backoff and remove the enclosing task retry.

"nuget": {
"name": "Microsoft.Extensions.Configuration",
"version": "10.0.0"
"version": "11.0.0"

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.

[minor] Build & MSBuild - The committed registrations for Microsoft.Extensions.Configuration, DependencyInjection and Logging.Debug use 11.0.0, while their central Versions.props properties are 11.0.1. update-cgmanifest.ps1 maps these packages directly to those stable properties, so regeneration rewrites all three registrations to 11.0.1; the prerelease N-1 substitution does not apply. The committed dependency inventory therefore disagrees with its generator. Regenerate it from the central versions rather than retaining these manual version replacements.

This branch was previously deployed

1 inactive (outdated) deployment
copilot-pat-pool — cdaeaee8 Deployed Nov 9, 2026 by kubaflo via conclusion #2824
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

s/agent-gate-failed AI could not verify tests catch the bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants