Skip to content

[Testing] Fix MenuFlyout Apple device-test compilation - #40228

Merged
kubaflo merged 1 commit into
candidate/11.0.1xx-sr2from
kubaflo-menuflyout-compilation-fix
Nov 13, 2026
Merged

kubaflo merged 1 commit into
candidate/11.0.1xx-sr2from
kubaflo-menuflyout-compilation-fix

Conversation

@kubaflo

@kubaflo kubaflo commented Nov 13, 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.

This is an explicitly coordinated, candidate-only compilation repair for #40116, based on candidate/11.0.1xx-sr2 at 7e47665ecb7f68d3fb31f8d02806e2bf177f505d.

Description of Change

Add the missing Microsoft.Maui.Hosting import to Issue17210.iOS.cs, introduced by #40072 (0698313d8d9e5ccf1d1f4adabe1fba62699870c7). Its nested TestApplicationDelegate.CreateMauiApp() returns MauiApp, which is declared in that namespace. The file compiles for both iOS and Mac Catalyst.

This resolves the two CS0246 compiler failures in maui-pr 1679721's Debug compiler log (original diagnostics at physical lines 655 and 672; repeated summary at 1062 and 1063). No product code, assertions, test registration, override implementation, project settings, or pipeline changes.

Compilation validation

Native full-project Compile validation, diagnostic toolchain only: .NET SDK 11.0.100, Apple SDK 27.2, Xcode 27.2 (27B52). The candidate's pinned SDK 11.0.101-servicing.26559.106 / Apple 27.0 was unavailable locally. This is not pinned-toolchain certification or a runtime test.

Source state iOS Mac Catalyst
Original candidate CS0246: MauiApp CS0246: MauiApp
Import added 0 errors 0 errors
Only import removed Same CS0246 Same CS0246
Import restored 0 errors 0 errors

Successful diagnostic runs retain the existing CollectionViewTests.iOS.cs:180 CS0618 obsolete-handler diagnostic as a warning via invocation-only -p:WarningsNotAsErrors=CS0618; no warning settings are committed. Without that flag, the import eliminates CS0246 but this unrelated existing diagnostic remains an error. Successful runs each report two warnings: that CS0618 and the existing runner MAUI1001 warning.

Compilation commands below passed for both targets with the import, failed with the same missing-type error when only the import was removed, and passed again when restored (binary-log paths omitted):

for platform in ios maccatalyst; do
  rid=maccatalyst-arm64
  if [ "$platform" = ios ]; then rid=iossimulator-arm64; fi
  dotnet build src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj \
    -c Debug -f "net11.0-$platform" -t:Compile \
    -p:MauiDeviceTestsPlatforms="net11.0-$platform" \
    -p:MauiPlatforms="net11.0-${platform}27.2" \
    -p:IosTargetFrameworkVersion=27.2 \
    -p:IosTargetFrameworkVersionSdkDefault=27.2 \
    -p:MacCatalystTargetFrameworkVersion=27.2 \
    -p:MacCatalystTargetFrameworkVersionSdkDefault=27.2 \
    -p:RuntimeIdentifier="$rid" \
    -p:IncludeAndroidTargetFrameworks=false \
    -p:IncludeWindowsTargetFrameworks=false \
    -p:IncludeIosTargetFrameworks=false \
    -p:IncludeMacCatalystTargetFrameworks=false \
    -p:IncludeMacOSTargetFrameworks=false \
    -p:WarningsNotAsErrors=CS0618 -v:q
done

dotnet format Microsoft.Maui.sln --no-restore --include src/Controls/tests/DeviceTests/Elements/MenuFlyoutItem/Issue17210.iOS.cs --exclude Templates/src --exclude-diagnostics CA1822 --verbosity quiet — passed.

git diff --check — passed. Runtime tests and local Release compilation were not run; this repair changes name resolution only. No additional broad CI runs were manually queued.

Issues Fixed

Relates to #40116 and #40072.

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

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 13, 2026
@kubaflo

kubaflo commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

/rebase

@kubaflo

This comment has been minimized.

@MauiBot

MauiBot commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

PR Test Gate

@kubaflo — existing-test verification; Setup did not capture a tested commit.

Result INCONCLUSIVE Platform Android


🧪 Gate analysis — click to expand

⚠ Inconclusive. Setup, build, or execution did not produce a conclusive result. This does not prove the fix is incorrect.

No interpretable test-group summary was produced. No additional test execution is inferred.

Setup did not capture a verified PR head; no commit is claimed as tested.

No immutable without-fix baseline was prepared.

@azure-pipelines

This comment has been minimized.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Nov 13, 2026
@kubaflo

kubaflo commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

The normal repository CI has now confirmed the compiler correction at head faa2dd3ec8cf4be79b7d4c10721649d720634438 / merge b93295a5c54c936a3abd4e28473ed0a34ddea9be:

  • Windows Debug raw log139: Controls.DeviceTests compiled for MacCatalyst (line2781) and iOS (2821); build succeeded2884, zero errors3315.
  • Windows Release raw log149: Controls.DeviceTests compiled for iOS (2050) and MacCatalyst (2827); build succeeded2933, zero errors3362.

These are the actual previously failing Apple C# targets under the CI toolchain, not just the local diagnostic27.2 result. This does not claim macOS packaging/runtime or full-CI success.

Original 1679804, now superseded by your15:26 /azp run, separately had one Windows Debug Resizetizer work-item timeout. Its console stops after xUnit starts, no result XML was uploaded, and no failing test identity is established. The exact candidate-base comparator1679721 has actual XML794 passed/2 skipped/0 failed/0 errors. No Resizetizer production/test source changes are in this one-line import PR; the timeout remains unclassified rather than called a fix regression or infrastructure.

Your replacement main1679920 plus UI1679921/device1679922 are queued/running at the same merge. I am following those outcomes; no duplicate unit retry was submitted and no timeout/assertion was changed.

Replacement unit outcome (verified): your unchanged replacement1679920 completed its Helix unit stage successfully, with no monitor resubmission. Own raw log134 identifies Windows Debug job 6e418a8a-fd69-4100-860b-7e05aca8248a. The actual Resizetizer XML has796 records:794 passed,two existing skips,zero failures/assembly errors; console confirms normal exit0. The original timeout on a00GBNP remains preserved; this passing execution on a00GBQA does not identify its cause or constitute a Resizetizer source fix. No timeout/assertion/source changes or additional agent retry were made.

@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 — 0 findings

Reviewed commit faa2dd3.

Source assessment incomplete (5/6 dimensions); finding count is partial.

@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 13, 2026
@MauiBot

MauiBot commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

PR Test Gate

@kubaflo — existing-test verification; Setup did not capture a tested commit.

Result INCONCLUSIVE Platform Android


🧪 Gate analysis — click to expand

⚠ Inconclusive. Setup, build, or execution did not produce a conclusive result. This does not prove the fix is incorrect.

No interpretable test-group summary was produced. No additional test execution is inferred.

Setup did not capture a verified PR head; no commit is claimed as tested.

No immutable without-fix baseline was prepared.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Nov 13, 2026

@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 — 0 findings

Reviewed commit faa2dd3.

@kubaflo

kubaflo commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

The complete replacement Build stage now passes on all four normal CI jobs, at unchanged head faa2dd3ec8cf4be79b7d4c10721649d720634438 / merge b93295a5c54c936a3abd4e28473ed0a34ddea9be in 1679920.

I read each complete raw Azure log and verified the previously broken Controls.DeviceTests outputs for both Apple targets, not just the stage color:

Host/configuration Raw log Actual iOS / Catalyst DLL lines Zero-error line
macOS Debug 248 (1073 lines) 354 / 749 1069
macOS Release 285 (1127 lines) 695 / 632 1123
Windows Debug 139 (3318 lines) 2717 / 2720 3315
Windows Release 149 (3365 lines) 2731 / 2613 3362

This confirms the one-line import resolves the original CS0246 under the normal CI toolchain on macOS and Windows, beyond the disclosed local diagnostic result. The replacement unit stage also passed, including actual Resizetizer XML794 pass/two existing skips. Pack, integration and native runtime outcomes remain separate; this is not an all-CI-green or runtime-certification claim. No additional build or test wave was queued.

Runtime follow-up: Pack now passed, and both Mono/CoreCLR device-test builds succeeded with actual iOS/Android outputs (plus Catalyst for CoreCLR), restoring the five runtime legs that were skipped on the candidate's compile failure. The completed iOS Mono leg is not green: all16 product XMLs reconcile to10,107 passes, three real assertion failures,136 skips and zero assembly errors/gaps.

  • iOS18.1/Xcode16.1, BOT-0306: MemoryTests.PagesDoNotLeak(ContentPage, includeNavigationViewHandler:true) retains a native ContentView.
  • iOS26.0/Xcode26.0.1, dci-mac-build-468: MemoryTests_TabbedViewHandler.GestureDoesNotLeak(TapGestureRecognizer) retains a Label; TabbedPageNavigationHandlerTests.TabbedPageDoesNotLeakGradientBrushSubscriberWhenSetViaStyle retains a TabbedRenderer.

Each exact case passes in the other current-source queue. All60 exact case records across the five target samples'20 retained General XMLs pass, as do the inspected prior-candidate cases. This is still unmatched GC evidence, not proof of an import regression, a harmless-infrastructure verdict or a GC repair. The direct gradient-subscription-removal companion passes on both queues; the failed GC check alone does not establish a brush-unsubscription regression. No assertion/collection budget/skip was changed and no extra retry was queued.

Own raw device log135 links older-queue work item and newer-queue work item; original XMLs and count-consistent audit are retained. The other runtime outcomes remain separate.

@kubaflo
kubaflo merged commit 83c2174 into candidate/11.0.1xx-sr2 Nov 13, 2026
78 of 188 checks passed
@kubaflo
kubaflo deleted the kubaflo-menuflyout-compilation-fix branch November 13, 2026 18:30
kubaflo added a commit that referenced this pull request Nov 13, 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!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

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

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

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.

This is an explicitly coordinated, candidate-only compilation repair for
#40116, based on `candidate/11.0.1xx-sr2` at
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`.

### Description of Change

<!-- Enter description of the fix in this section -->

Add the missing `Microsoft.Maui.Hosting` import to `Issue17210.iOS.cs`,
introduced by #40072 (`0698313d8d9e5ccf1d1f4adabe1fba62699870c7`). Its
nested `TestApplicationDelegate.CreateMauiApp()` returns `MauiApp`,
which is declared in that namespace. The file compiles for both iOS and
Mac Catalyst.

This resolves the two CS0246 compiler failures in [maui-pr 1679721's
Debug compiler
log](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1679721/logs/207)
(original diagnostics at physical lines 655 and 672; repeated summary at
1062 and 1063). No product code, assertions, test registration, override
implementation, project settings, or pipeline changes.

#### Compilation validation

Native full-project `Compile` validation, **diagnostic toolchain only**:
.NET SDK **11.0.100**, Apple SDK **27.2**, Xcode **27.2 (27B52)**. The
candidate's pinned SDK `11.0.101-servicing.26559.106` / Apple **27.0**
was unavailable locally. This is not pinned-toolchain certification or a
runtime test.

| Source state | iOS | Mac Catalyst |
| --- | --- | --- |
| Original candidate | CS0246: `MauiApp` | CS0246: `MauiApp` |
| Import added | 0 errors | 0 errors |
| Only import removed | Same CS0246 | Same CS0246 |
| Import restored | 0 errors | 0 errors |

Successful diagnostic runs retain the existing
`CollectionViewTests.iOS.cs:180` CS0618 obsolete-handler diagnostic as a
warning via **invocation-only** `-p:WarningsNotAsErrors=CS0618`; no
warning settings are committed. Without that flag, the import eliminates
CS0246 but this unrelated existing diagnostic remains an error.
Successful runs each report two warnings: that CS0618 and the existing
runner MAUI1001 warning.

Compilation commands below passed for both targets with the import,
failed with the same missing-type error when only the import was
removed, and passed again when restored (binary-log paths omitted):

```bash
for platform in ios maccatalyst; do
  rid=maccatalyst-arm64
  if [ "$platform" = ios ]; then rid=iossimulator-arm64; fi
  dotnet build src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj \
    -c Debug -f "net11.0-$platform" -t:Compile \
    -p:MauiDeviceTestsPlatforms="net11.0-$platform" \
    -p:MauiPlatforms="net11.0-${platform}27.2" \
    -p:IosTargetFrameworkVersion=27.2 \
    -p:IosTargetFrameworkVersionSdkDefault=27.2 \
    -p:MacCatalystTargetFrameworkVersion=27.2 \
    -p:MacCatalystTargetFrameworkVersionSdkDefault=27.2 \
    -p:RuntimeIdentifier="$rid" \
    -p:IncludeAndroidTargetFrameworks=false \
    -p:IncludeWindowsTargetFrameworks=false \
    -p:IncludeIosTargetFrameworks=false \
    -p:IncludeMacCatalystTargetFrameworks=false \
    -p:IncludeMacOSTargetFrameworks=false \
    -p:WarningsNotAsErrors=CS0618 -v:q
done
```

`dotnet format Microsoft.Maui.sln --no-restore --include
src/Controls/tests/DeviceTests/Elements/MenuFlyoutItem/Issue17210.iOS.cs
--exclude Templates/src --exclude-diagnostics CA1822 --verbosity quiet`
— passed.

`git diff --check` — passed. Runtime tests and local Release compilation
were not run; this repair changes name resolution only. No additional
broad CI runs were manually queued.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Relates to #40116 and #40072.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

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

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

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

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

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.

This is an explicitly coordinated, candidate-only compilation repair for
#40116, based on `candidate/11.0.1xx-sr2` at
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`.

### Description of Change

<!-- Enter description of the fix in this section -->

Add the missing `Microsoft.Maui.Hosting` import to `Issue17210.iOS.cs`,
introduced by #40072 (`0698313d8d9e5ccf1d1f4adabe1fba62699870c7`). Its
nested `TestApplicationDelegate.CreateMauiApp()` returns `MauiApp`,
which is declared in that namespace. The file compiles for both iOS and
Mac Catalyst.

This resolves the two CS0246 compiler failures in [maui-pr 1679721's
Debug compiler
log](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1679721/logs/207)
(original diagnostics at physical lines 655 and 672; repeated summary at
1062 and 1063). No product code, assertions, test registration, override
implementation, project settings, or pipeline changes.

#### Compilation validation

Native full-project `Compile` validation, **diagnostic toolchain only**:
.NET SDK **11.0.100**, Apple SDK **27.2**, Xcode **27.2 (27B52)**. The
candidate's pinned SDK `11.0.101-servicing.26559.106` / Apple **27.0**
was unavailable locally. This is not pinned-toolchain certification or a
runtime test.

| Source state | iOS | Mac Catalyst |
| --- | --- | --- |
| Original candidate | CS0246: `MauiApp` | CS0246: `MauiApp` |
| Import added | 0 errors | 0 errors |
| Only import removed | Same CS0246 | Same CS0246 |
| Import restored | 0 errors | 0 errors |

Successful diagnostic runs retain the existing
`CollectionViewTests.iOS.cs:180` CS0618 obsolete-handler diagnostic as a
warning via **invocation-only** `-p:WarningsNotAsErrors=CS0618`; no
warning settings are committed. Without that flag, the import eliminates
CS0246 but this unrelated existing diagnostic remains an error.
Successful runs each report two warnings: that CS0618 and the existing
runner MAUI1001 warning.

Compilation commands below passed for both targets with the import,
failed with the same missing-type error when only the import was
removed, and passed again when restored (binary-log paths omitted):

```bash
for platform in ios maccatalyst; do
  rid=maccatalyst-arm64
  if [ "$platform" = ios ]; then rid=iossimulator-arm64; fi
  dotnet build src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj \
    -c Debug -f "net11.0-$platform" -t:Compile \
    -p:MauiDeviceTestsPlatforms="net11.0-$platform" \
    -p:MauiPlatforms="net11.0-${platform}27.2" \
    -p:IosTargetFrameworkVersion=27.2 \
    -p:IosTargetFrameworkVersionSdkDefault=27.2 \
    -p:MacCatalystTargetFrameworkVersion=27.2 \
    -p:MacCatalystTargetFrameworkVersionSdkDefault=27.2 \
    -p:RuntimeIdentifier="$rid" \
    -p:IncludeAndroidTargetFrameworks=false \
    -p:IncludeWindowsTargetFrameworks=false \
    -p:IncludeIosTargetFrameworks=false \
    -p:IncludeMacCatalystTargetFrameworks=false \
    -p:IncludeMacOSTargetFrameworks=false \
    -p:WarningsNotAsErrors=CS0618 -v:q
done
```

`dotnet format Microsoft.Maui.sln --no-restore --include
src/Controls/tests/DeviceTests/Elements/MenuFlyoutItem/Issue17210.iOS.cs
--exclude Templates/src --exclude-diagnostics CA1822 --verbosity quiet`
— passed.

`git diff --check` — passed. Runtime tests and local Release compilation
were not run; this repair changes name resolution only. No additional
broad CI runs were manually queued.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Relates to #40116 and #40072.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

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

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

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

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

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.

This is an explicitly coordinated, candidate-only compilation repair for
#40116, based on `candidate/11.0.1xx-sr2` at
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`.

### Description of Change

<!-- Enter description of the fix in this section -->

Add the missing `Microsoft.Maui.Hosting` import to `Issue17210.iOS.cs`,
introduced by #40072 (`0698313d8d9e5ccf1d1f4adabe1fba62699870c7`). Its
nested `TestApplicationDelegate.CreateMauiApp()` returns `MauiApp`,
which is declared in that namespace. The file compiles for both iOS and
Mac Catalyst.

This resolves the two CS0246 compiler failures in [maui-pr 1679721's
Debug compiler
log](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1679721/logs/207)
(original diagnostics at physical lines 655 and 672; repeated summary at
1062 and 1063). No product code, assertions, test registration, override
implementation, project settings, or pipeline changes.

#### Compilation validation

Native full-project `Compile` validation, **diagnostic toolchain only**:
.NET SDK **11.0.100**, Apple SDK **27.2**, Xcode **27.2 (27B52)**. The
candidate's pinned SDK `11.0.101-servicing.26559.106` / Apple **27.0**
was unavailable locally. This is not pinned-toolchain certification or a
runtime test.

| Source state | iOS | Mac Catalyst |
| --- | --- | --- |
| Original candidate | CS0246: `MauiApp` | CS0246: `MauiApp` |
| Import added | 0 errors | 0 errors |
| Only import removed | Same CS0246 | Same CS0246 |
| Import restored | 0 errors | 0 errors |

Successful diagnostic runs retain the existing
`CollectionViewTests.iOS.cs:180` CS0618 obsolete-handler diagnostic as a
warning via **invocation-only** `-p:WarningsNotAsErrors=CS0618`; no
warning settings are committed. Without that flag, the import eliminates
CS0246 but this unrelated existing diagnostic remains an error.
Successful runs each report two warnings: that CS0618 and the existing
runner MAUI1001 warning.

Compilation commands below passed for both targets with the import,
failed with the same missing-type error when only the import was
removed, and passed again when restored (binary-log paths omitted):

```bash
for platform in ios maccatalyst; do
  rid=maccatalyst-arm64
  if [ "$platform" = ios ]; then rid=iossimulator-arm64; fi
  dotnet build src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj \
    -c Debug -f "net11.0-$platform" -t:Compile \
    -p:MauiDeviceTestsPlatforms="net11.0-$platform" \
    -p:MauiPlatforms="net11.0-${platform}27.2" \
    -p:IosTargetFrameworkVersion=27.2 \
    -p:IosTargetFrameworkVersionSdkDefault=27.2 \
    -p:MacCatalystTargetFrameworkVersion=27.2 \
    -p:MacCatalystTargetFrameworkVersionSdkDefault=27.2 \
    -p:RuntimeIdentifier="$rid" \
    -p:IncludeAndroidTargetFrameworks=false \
    -p:IncludeWindowsTargetFrameworks=false \
    -p:IncludeIosTargetFrameworks=false \
    -p:IncludeMacCatalystTargetFrameworks=false \
    -p:IncludeMacOSTargetFrameworks=false \
    -p:WarningsNotAsErrors=CS0618 -v:q
done
```

`dotnet format Microsoft.Maui.sln --no-restore --include
src/Controls/tests/DeviceTests/Elements/MenuFlyoutItem/Issue17210.iOS.cs
--exclude Templates/src --exclude-diagnostics CA1822 --verbosity quiet`
— passed.

`git diff --check` — passed. Runtime tests and local Release compilation
were not run; this repair changes name resolution only. No additional
broad CI runs were manually queued.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Relates to #40116 and #40072.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

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

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

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

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

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.

This is an explicitly coordinated, candidate-only compilation repair for
#40116, based on `candidate/11.0.1xx-sr2` at
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`.

### Description of Change

<!-- Enter description of the fix in this section -->

Add the missing `Microsoft.Maui.Hosting` import to `Issue17210.iOS.cs`,
introduced by #40072 (`0698313d8d9e5ccf1d1f4adabe1fba62699870c7`). Its
nested `TestApplicationDelegate.CreateMauiApp()` returns `MauiApp`,
which is declared in that namespace. The file compiles for both iOS and
Mac Catalyst.

This resolves the two CS0246 compiler failures in [maui-pr 1679721's
Debug compiler
log](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1679721/logs/207)
(original diagnostics at physical lines 655 and 672; repeated summary at
1062 and 1063). No product code, assertions, test registration, override
implementation, project settings, or pipeline changes.

#### Compilation validation

Native full-project `Compile` validation, **diagnostic toolchain only**:
.NET SDK **11.0.100**, Apple SDK **27.2**, Xcode **27.2 (27B52)**. The
candidate's pinned SDK `11.0.101-servicing.26559.106` / Apple **27.0**
was unavailable locally. This is not pinned-toolchain certification or a
runtime test.

| Source state | iOS | Mac Catalyst |
| --- | --- | --- |
| Original candidate | CS0246: `MauiApp` | CS0246: `MauiApp` |
| Import added | 0 errors | 0 errors |
| Only import removed | Same CS0246 | Same CS0246 |
| Import restored | 0 errors | 0 errors |

Successful diagnostic runs retain the existing
`CollectionViewTests.iOS.cs:180` CS0618 obsolete-handler diagnostic as a
warning via **invocation-only** `-p:WarningsNotAsErrors=CS0618`; no
warning settings are committed. Without that flag, the import eliminates
CS0246 but this unrelated existing diagnostic remains an error.
Successful runs each report two warnings: that CS0618 and the existing
runner MAUI1001 warning.

Compilation commands below passed for both targets with the import,
failed with the same missing-type error when only the import was
removed, and passed again when restored (binary-log paths omitted):

```bash
for platform in ios maccatalyst; do
  rid=maccatalyst-arm64
  if [ "$platform" = ios ]; then rid=iossimulator-arm64; fi
  dotnet build src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj \
    -c Debug -f "net11.0-$platform" -t:Compile \
    -p:MauiDeviceTestsPlatforms="net11.0-$platform" \
    -p:MauiPlatforms="net11.0-${platform}27.2" \
    -p:IosTargetFrameworkVersion=27.2 \
    -p:IosTargetFrameworkVersionSdkDefault=27.2 \
    -p:MacCatalystTargetFrameworkVersion=27.2 \
    -p:MacCatalystTargetFrameworkVersionSdkDefault=27.2 \
    -p:RuntimeIdentifier="$rid" \
    -p:IncludeAndroidTargetFrameworks=false \
    -p:IncludeWindowsTargetFrameworks=false \
    -p:IncludeIosTargetFrameworks=false \
    -p:IncludeMacCatalystTargetFrameworks=false \
    -p:IncludeMacOSTargetFrameworks=false \
    -p:WarningsNotAsErrors=CS0618 -v:q
done
```

`dotnet format Microsoft.Maui.sln --no-restore --include
src/Controls/tests/DeviceTests/Elements/MenuFlyoutItem/Issue17210.iOS.cs
--exclude Templates/src --exclude-diagnostics CA1822 --verbosity quiet`
— passed.

`git diff --check` — passed. Runtime tests and local Release compilation
were not run; this repair changes name resolution only. No additional
broad CI runs were manually queued.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Relates to #40116 and #40072.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

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

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

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

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

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.

This is an explicitly coordinated, candidate-only compilation repair for
#40116, based on `candidate/11.0.1xx-sr2` at
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`.

### Description of Change

<!-- Enter description of the fix in this section -->

Add the missing `Microsoft.Maui.Hosting` import to `Issue17210.iOS.cs`,
introduced by #40072 (`0698313d8d9e5ccf1d1f4adabe1fba62699870c7`). Its
nested `TestApplicationDelegate.CreateMauiApp()` returns `MauiApp`,
which is declared in that namespace. The file compiles for both iOS and
Mac Catalyst.

This resolves the two CS0246 compiler failures in [maui-pr 1679721's
Debug compiler
log](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1679721/logs/207)
(original diagnostics at physical lines 655 and 672; repeated summary at
1062 and 1063). No product code, assertions, test registration, override
implementation, project settings, or pipeline changes.

#### Compilation validation

Native full-project `Compile` validation, **diagnostic toolchain only**:
.NET SDK **11.0.100**, Apple SDK **27.2**, Xcode **27.2 (27B52)**. The
candidate's pinned SDK `11.0.101-servicing.26559.106` / Apple **27.0**
was unavailable locally. This is not pinned-toolchain certification or a
runtime test.

| Source state | iOS | Mac Catalyst |
| --- | --- | --- |
| Original candidate | CS0246: `MauiApp` | CS0246: `MauiApp` |
| Import added | 0 errors | 0 errors |
| Only import removed | Same CS0246 | Same CS0246 |
| Import restored | 0 errors | 0 errors |

Successful diagnostic runs retain the existing
`CollectionViewTests.iOS.cs:180` CS0618 obsolete-handler diagnostic as a
warning via **invocation-only** `-p:WarningsNotAsErrors=CS0618`; no
warning settings are committed. Without that flag, the import eliminates
CS0246 but this unrelated existing diagnostic remains an error.
Successful runs each report two warnings: that CS0618 and the existing
runner MAUI1001 warning.

Compilation commands below passed for both targets with the import,
failed with the same missing-type error when only the import was
removed, and passed again when restored (binary-log paths omitted):

```bash
for platform in ios maccatalyst; do
  rid=maccatalyst-arm64
  if [ "$platform" = ios ]; then rid=iossimulator-arm64; fi
  dotnet build src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj \
    -c Debug -f "net11.0-$platform" -t:Compile \
    -p:MauiDeviceTestsPlatforms="net11.0-$platform" \
    -p:MauiPlatforms="net11.0-${platform}27.2" \
    -p:IosTargetFrameworkVersion=27.2 \
    -p:IosTargetFrameworkVersionSdkDefault=27.2 \
    -p:MacCatalystTargetFrameworkVersion=27.2 \
    -p:MacCatalystTargetFrameworkVersionSdkDefault=27.2 \
    -p:RuntimeIdentifier="$rid" \
    -p:IncludeAndroidTargetFrameworks=false \
    -p:IncludeWindowsTargetFrameworks=false \
    -p:IncludeIosTargetFrameworks=false \
    -p:IncludeMacCatalystTargetFrameworks=false \
    -p:IncludeMacOSTargetFrameworks=false \
    -p:WarningsNotAsErrors=CS0618 -v:q
done
```

`dotnet format Microsoft.Maui.sln --no-restore --include
src/Controls/tests/DeviceTests/Elements/MenuFlyoutItem/Issue17210.iOS.cs
--exclude Templates/src --exclude-diagnostics CA1822 --verbosity quiet`
— passed.

`git diff --check` — passed. Runtime tests and local Release compilation
were not run; this repair changes name resolution only. No additional
broad CI runs were manually queued.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Relates to #40116 and #40072.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

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

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

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

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

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.

This is an explicitly coordinated, candidate-only compilation repair for
#40116, based on `candidate/11.0.1xx-sr2` at
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`.

### Description of Change

<!-- Enter description of the fix in this section -->

Add the missing `Microsoft.Maui.Hosting` import to `Issue17210.iOS.cs`,
introduced by #40072 (`0698313d8d9e5ccf1d1f4adabe1fba62699870c7`). Its
nested `TestApplicationDelegate.CreateMauiApp()` returns `MauiApp`,
which is declared in that namespace. The file compiles for both iOS and
Mac Catalyst.

This resolves the two CS0246 compiler failures in [maui-pr 1679721's
Debug compiler
log](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1679721/logs/207)
(original diagnostics at physical lines 655 and 672; repeated summary at
1062 and 1063). No product code, assertions, test registration, override
implementation, project settings, or pipeline changes.

#### Compilation validation

Native full-project `Compile` validation, **diagnostic toolchain only**:
.NET SDK **11.0.100**, Apple SDK **27.2**, Xcode **27.2 (27B52)**. The
candidate's pinned SDK `11.0.101-servicing.26559.106` / Apple **27.0**
was unavailable locally. This is not pinned-toolchain certification or a
runtime test.

| Source state | iOS | Mac Catalyst |
| --- | --- | --- |
| Original candidate | CS0246: `MauiApp` | CS0246: `MauiApp` |
| Import added | 0 errors | 0 errors |
| Only import removed | Same CS0246 | Same CS0246 |
| Import restored | 0 errors | 0 errors |

Successful diagnostic runs retain the existing
`CollectionViewTests.iOS.cs:180` CS0618 obsolete-handler diagnostic as a
warning via **invocation-only** `-p:WarningsNotAsErrors=CS0618`; no
warning settings are committed. Without that flag, the import eliminates
CS0246 but this unrelated existing diagnostic remains an error.
Successful runs each report two warnings: that CS0618 and the existing
runner MAUI1001 warning.

Compilation commands below passed for both targets with the import,
failed with the same missing-type error when only the import was
removed, and passed again when restored (binary-log paths omitted):

```bash
for platform in ios maccatalyst; do
  rid=maccatalyst-arm64
  if [ "$platform" = ios ]; then rid=iossimulator-arm64; fi
  dotnet build src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj \
    -c Debug -f "net11.0-$platform" -t:Compile \
    -p:MauiDeviceTestsPlatforms="net11.0-$platform" \
    -p:MauiPlatforms="net11.0-${platform}27.2" \
    -p:IosTargetFrameworkVersion=27.2 \
    -p:IosTargetFrameworkVersionSdkDefault=27.2 \
    -p:MacCatalystTargetFrameworkVersion=27.2 \
    -p:MacCatalystTargetFrameworkVersionSdkDefault=27.2 \
    -p:RuntimeIdentifier="$rid" \
    -p:IncludeAndroidTargetFrameworks=false \
    -p:IncludeWindowsTargetFrameworks=false \
    -p:IncludeIosTargetFrameworks=false \
    -p:IncludeMacCatalystTargetFrameworks=false \
    -p:IncludeMacOSTargetFrameworks=false \
    -p:WarningsNotAsErrors=CS0618 -v:q
done
```

`dotnet format Microsoft.Maui.sln --no-restore --include
src/Controls/tests/DeviceTests/Elements/MenuFlyoutItem/Issue17210.iOS.cs
--exclude Templates/src --exclude-diagnostics CA1822 --verbosity quiet`
— passed.

`git diff --check` — passed. Runtime tests and local Release compilation
were not run; this repair changes name resolution only. No additional
broad CI runs were manually queued.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Relates to #40116 and #40072.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

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

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

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

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

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.

This is an explicitly coordinated, candidate-only compilation repair for
#40116, based on `candidate/11.0.1xx-sr2` at
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`.

### Description of Change

<!-- Enter description of the fix in this section -->

Add the missing `Microsoft.Maui.Hosting` import to `Issue17210.iOS.cs`,
introduced by #40072 (`0698313d8d9e5ccf1d1f4adabe1fba62699870c7`). Its
nested `TestApplicationDelegate.CreateMauiApp()` returns `MauiApp`,
which is declared in that namespace. The file compiles for both iOS and
Mac Catalyst.

This resolves the two CS0246 compiler failures in [maui-pr 1679721's
Debug compiler
log](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1679721/logs/207)
(original diagnostics at physical lines 655 and 672; repeated summary at
1062 and 1063). No product code, assertions, test registration, override
implementation, project settings, or pipeline changes.

#### Compilation validation

Native full-project `Compile` validation, **diagnostic toolchain only**:
.NET SDK **11.0.100**, Apple SDK **27.2**, Xcode **27.2 (27B52)**. The
candidate's pinned SDK `11.0.101-servicing.26559.106` / Apple **27.0**
was unavailable locally. This is not pinned-toolchain certification or a
runtime test.

| Source state | iOS | Mac Catalyst |
| --- | --- | --- |
| Original candidate | CS0246: `MauiApp` | CS0246: `MauiApp` |
| Import added | 0 errors | 0 errors |
| Only import removed | Same CS0246 | Same CS0246 |
| Import restored | 0 errors | 0 errors |

Successful diagnostic runs retain the existing
`CollectionViewTests.iOS.cs:180` CS0618 obsolete-handler diagnostic as a
warning via **invocation-only** `-p:WarningsNotAsErrors=CS0618`; no
warning settings are committed. Without that flag, the import eliminates
CS0246 but this unrelated existing diagnostic remains an error.
Successful runs each report two warnings: that CS0618 and the existing
runner MAUI1001 warning.

Compilation commands below passed for both targets with the import,
failed with the same missing-type error when only the import was
removed, and passed again when restored (binary-log paths omitted):

```bash
for platform in ios maccatalyst; do
  rid=maccatalyst-arm64
  if [ "$platform" = ios ]; then rid=iossimulator-arm64; fi
  dotnet build src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj \
    -c Debug -f "net11.0-$platform" -t:Compile \
    -p:MauiDeviceTestsPlatforms="net11.0-$platform" \
    -p:MauiPlatforms="net11.0-${platform}27.2" \
    -p:IosTargetFrameworkVersion=27.2 \
    -p:IosTargetFrameworkVersionSdkDefault=27.2 \
    -p:MacCatalystTargetFrameworkVersion=27.2 \
    -p:MacCatalystTargetFrameworkVersionSdkDefault=27.2 \
    -p:RuntimeIdentifier="$rid" \
    -p:IncludeAndroidTargetFrameworks=false \
    -p:IncludeWindowsTargetFrameworks=false \
    -p:IncludeIosTargetFrameworks=false \
    -p:IncludeMacCatalystTargetFrameworks=false \
    -p:IncludeMacOSTargetFrameworks=false \
    -p:WarningsNotAsErrors=CS0618 -v:q
done
```

`dotnet format Microsoft.Maui.sln --no-restore --include
src/Controls/tests/DeviceTests/Elements/MenuFlyoutItem/Issue17210.iOS.cs
--exclude Templates/src --exclude-diagnostics CA1822 --verbosity quiet`
— passed.

`git diff --check` — passed. Runtime tests and local Release compilation
were not run; this repair changes name resolution only. No additional
broad CI runs were manually queued.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Relates to #40116 and #40072.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

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

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

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

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

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.

This is an explicitly coordinated, candidate-only compilation repair for
#40116, based on `candidate/11.0.1xx-sr2` at
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`.

### Description of Change

<!-- Enter description of the fix in this section -->

Add the missing `Microsoft.Maui.Hosting` import to `Issue17210.iOS.cs`,
introduced by #40072 (`0698313d8d9e5ccf1d1f4adabe1fba62699870c7`). Its
nested `TestApplicationDelegate.CreateMauiApp()` returns `MauiApp`,
which is declared in that namespace. The file compiles for both iOS and
Mac Catalyst.

This resolves the two CS0246 compiler failures in [maui-pr 1679721's
Debug compiler
log](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1679721/logs/207)
(original diagnostics at physical lines 655 and 672; repeated summary at
1062 and 1063). No product code, assertions, test registration, override
implementation, project settings, or pipeline changes.

#### Compilation validation

Native full-project `Compile` validation, **diagnostic toolchain only**:
.NET SDK **11.0.100**, Apple SDK **27.2**, Xcode **27.2 (27B52)**. The
candidate's pinned SDK `11.0.101-servicing.26559.106` / Apple **27.0**
was unavailable locally. This is not pinned-toolchain certification or a
runtime test.

| Source state | iOS | Mac Catalyst |
| --- | --- | --- |
| Original candidate | CS0246: `MauiApp` | CS0246: `MauiApp` |
| Import added | 0 errors | 0 errors |
| Only import removed | Same CS0246 | Same CS0246 |
| Import restored | 0 errors | 0 errors |

Successful diagnostic runs retain the existing
`CollectionViewTests.iOS.cs:180` CS0618 obsolete-handler diagnostic as a
warning via **invocation-only** `-p:WarningsNotAsErrors=CS0618`; no
warning settings are committed. Without that flag, the import eliminates
CS0246 but this unrelated existing diagnostic remains an error.
Successful runs each report two warnings: that CS0618 and the existing
runner MAUI1001 warning.

Compilation commands below passed for both targets with the import,
failed with the same missing-type error when only the import was
removed, and passed again when restored (binary-log paths omitted):

```bash
for platform in ios maccatalyst; do
  rid=maccatalyst-arm64
  if [ "$platform" = ios ]; then rid=iossimulator-arm64; fi
  dotnet build src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj \
    -c Debug -f "net11.0-$platform" -t:Compile \
    -p:MauiDeviceTestsPlatforms="net11.0-$platform" \
    -p:MauiPlatforms="net11.0-${platform}27.2" \
    -p:IosTargetFrameworkVersion=27.2 \
    -p:IosTargetFrameworkVersionSdkDefault=27.2 \
    -p:MacCatalystTargetFrameworkVersion=27.2 \
    -p:MacCatalystTargetFrameworkVersionSdkDefault=27.2 \
    -p:RuntimeIdentifier="$rid" \
    -p:IncludeAndroidTargetFrameworks=false \
    -p:IncludeWindowsTargetFrameworks=false \
    -p:IncludeIosTargetFrameworks=false \
    -p:IncludeMacCatalystTargetFrameworks=false \
    -p:IncludeMacOSTargetFrameworks=false \
    -p:WarningsNotAsErrors=CS0618 -v:q
done
```

`dotnet format Microsoft.Maui.sln --no-restore --include
src/Controls/tests/DeviceTests/Elements/MenuFlyoutItem/Issue17210.iOS.cs
--exclude Templates/src --exclude-diagnostics CA1822 --verbosity quiet`
— passed.

`git diff --check` — passed. Runtime tests and local Release compilation
were not run; this repair changes name resolution only. No additional
broad CI runs were manually queued.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Relates to #40116 and #40072.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

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

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

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

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

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.

This is an explicitly coordinated, candidate-only compilation repair for
#40116, based on `candidate/11.0.1xx-sr2` at
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`.

### Description of Change

<!-- Enter description of the fix in this section -->

Add the missing `Microsoft.Maui.Hosting` import to `Issue17210.iOS.cs`,
introduced by #40072 (`0698313d8d9e5ccf1d1f4adabe1fba62699870c7`). Its
nested `TestApplicationDelegate.CreateMauiApp()` returns `MauiApp`,
which is declared in that namespace. The file compiles for both iOS and
Mac Catalyst.

This resolves the two CS0246 compiler failures in [maui-pr 1679721's
Debug compiler
log](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1679721/logs/207)
(original diagnostics at physical lines 655 and 672; repeated summary at
1062 and 1063). No product code, assertions, test registration, override
implementation, project settings, or pipeline changes.

#### Compilation validation

Native full-project `Compile` validation, **diagnostic toolchain only**:
.NET SDK **11.0.100**, Apple SDK **27.2**, Xcode **27.2 (27B52)**. The
candidate's pinned SDK `11.0.101-servicing.26559.106` / Apple **27.0**
was unavailable locally. This is not pinned-toolchain certification or a
runtime test.

| Source state | iOS | Mac Catalyst |
| --- | --- | --- |
| Original candidate | CS0246: `MauiApp` | CS0246: `MauiApp` |
| Import added | 0 errors | 0 errors |
| Only import removed | Same CS0246 | Same CS0246 |
| Import restored | 0 errors | 0 errors |

Successful diagnostic runs retain the existing
`CollectionViewTests.iOS.cs:180` CS0618 obsolete-handler diagnostic as a
warning via **invocation-only** `-p:WarningsNotAsErrors=CS0618`; no
warning settings are committed. Without that flag, the import eliminates
CS0246 but this unrelated existing diagnostic remains an error.
Successful runs each report two warnings: that CS0618 and the existing
runner MAUI1001 warning.

Compilation commands below passed for both targets with the import,
failed with the same missing-type error when only the import was
removed, and passed again when restored (binary-log paths omitted):

```bash
for platform in ios maccatalyst; do
  rid=maccatalyst-arm64
  if [ "$platform" = ios ]; then rid=iossimulator-arm64; fi
  dotnet build src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj \
    -c Debug -f "net11.0-$platform" -t:Compile \
    -p:MauiDeviceTestsPlatforms="net11.0-$platform" \
    -p:MauiPlatforms="net11.0-${platform}27.2" \
    -p:IosTargetFrameworkVersion=27.2 \
    -p:IosTargetFrameworkVersionSdkDefault=27.2 \
    -p:MacCatalystTargetFrameworkVersion=27.2 \
    -p:MacCatalystTargetFrameworkVersionSdkDefault=27.2 \
    -p:RuntimeIdentifier="$rid" \
    -p:IncludeAndroidTargetFrameworks=false \
    -p:IncludeWindowsTargetFrameworks=false \
    -p:IncludeIosTargetFrameworks=false \
    -p:IncludeMacCatalystTargetFrameworks=false \
    -p:IncludeMacOSTargetFrameworks=false \
    -p:WarningsNotAsErrors=CS0618 -v:q
done
```

`dotnet format Microsoft.Maui.sln --no-restore --include
src/Controls/tests/DeviceTests/Elements/MenuFlyoutItem/Issue17210.iOS.cs
--exclude Templates/src --exclude-diagnostics CA1822 --verbosity quiet`
— passed.

`git diff --check` — passed. Runtime tests and local Release compilation
were not run; this repair changes name resolution only. No additional
broad CI runs were manually queued.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Relates to #40116 and #40072.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

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

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

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

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

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.

This is an explicitly coordinated, candidate-only compilation repair for
#40116, based on `candidate/11.0.1xx-sr2` at
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`.

### Description of Change

<!-- Enter description of the fix in this section -->

Add the missing `Microsoft.Maui.Hosting` import to `Issue17210.iOS.cs`,
introduced by #40072 (`0698313d8d9e5ccf1d1f4adabe1fba62699870c7`). Its
nested `TestApplicationDelegate.CreateMauiApp()` returns `MauiApp`,
which is declared in that namespace. The file compiles for both iOS and
Mac Catalyst.

This resolves the two CS0246 compiler failures in [maui-pr 1679721's
Debug compiler
log](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1679721/logs/207)
(original diagnostics at physical lines 655 and 672; repeated summary at
1062 and 1063). No product code, assertions, test registration, override
implementation, project settings, or pipeline changes.

#### Compilation validation

Native full-project `Compile` validation, **diagnostic toolchain only**:
.NET SDK **11.0.100**, Apple SDK **27.2**, Xcode **27.2 (27B52)**. The
candidate's pinned SDK `11.0.101-servicing.26559.106` / Apple **27.0**
was unavailable locally. This is not pinned-toolchain certification or a
runtime test.

| Source state | iOS | Mac Catalyst |
| --- | --- | --- |
| Original candidate | CS0246: `MauiApp` | CS0246: `MauiApp` |
| Import added | 0 errors | 0 errors |
| Only import removed | Same CS0246 | Same CS0246 |
| Import restored | 0 errors | 0 errors |

Successful diagnostic runs retain the existing
`CollectionViewTests.iOS.cs:180` CS0618 obsolete-handler diagnostic as a
warning via **invocation-only** `-p:WarningsNotAsErrors=CS0618`; no
warning settings are committed. Without that flag, the import eliminates
CS0246 but this unrelated existing diagnostic remains an error.
Successful runs each report two warnings: that CS0618 and the existing
runner MAUI1001 warning.

Compilation commands below passed for both targets with the import,
failed with the same missing-type error when only the import was
removed, and passed again when restored (binary-log paths omitted):

```bash
for platform in ios maccatalyst; do
  rid=maccatalyst-arm64
  if [ "$platform" = ios ]; then rid=iossimulator-arm64; fi
  dotnet build src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj \
    -c Debug -f "net11.0-$platform" -t:Compile \
    -p:MauiDeviceTestsPlatforms="net11.0-$platform" \
    -p:MauiPlatforms="net11.0-${platform}27.2" \
    -p:IosTargetFrameworkVersion=27.2 \
    -p:IosTargetFrameworkVersionSdkDefault=27.2 \
    -p:MacCatalystTargetFrameworkVersion=27.2 \
    -p:MacCatalystTargetFrameworkVersionSdkDefault=27.2 \
    -p:RuntimeIdentifier="$rid" \
    -p:IncludeAndroidTargetFrameworks=false \
    -p:IncludeWindowsTargetFrameworks=false \
    -p:IncludeIosTargetFrameworks=false \
    -p:IncludeMacCatalystTargetFrameworks=false \
    -p:IncludeMacOSTargetFrameworks=false \
    -p:WarningsNotAsErrors=CS0618 -v:q
done
```

`dotnet format Microsoft.Maui.sln --no-restore --include
src/Controls/tests/DeviceTests/Elements/MenuFlyoutItem/Issue17210.iOS.cs
--exclude Templates/src --exclude-diagnostics CA1822 --verbosity quiet`
— passed.

`git diff --check` — passed. Runtime tests and local Release compilation
were not run; this repair changes name resolution only. No additional
broad CI runs were manually queued.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Relates to #40116 and #40072.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@kubaflo kubaflo added this to the .NET 11 SR2 milestone Nov 24, 2026

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — faa2dd3e Deployed Nov 13, 2026 by kubaflo via conclusion #2950
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants