Repository navigation
[Testing] Fix MenuFlyout Apple device-test compilation - #40228
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/rebase |
This comment has been minimized.
This comment has been minimized.
PR Test Gate
🧪 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. |
This comment has been minimized.
This comment has been minimized.
|
The normal repository CI has now confirmed the compiler correction at head
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 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 |
There was a problem hiding this comment.
Expert Review — 0 findings
Reviewed commit faa2dd3.
Source assessment incomplete (5/6 dimensions); finding count is partial.
This comment has been minimized.
This comment has been minimized.
PR Test Gate
🧪 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. |
There was a problem hiding this comment.
Expert Review — 0 findings
Reviewed commit faa2dd3.
|
The complete replacement Build stage now passes on all four normal CI jobs, at unchanged head I read each complete raw Azure log and verified the previously broken Controls.DeviceTests outputs for both Apple targets, not just the stage color:
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.
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. |
<!-- 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>
<!-- 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>
<!-- 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>
<!-- 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>
<!-- 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>
<!-- 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>
<!-- 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>
<!-- 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>
<!-- 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>
<!-- 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>
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
mainnet11, for reviewFor .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-sr2at7e47665ecb7f68d3fb31f8d02806e2bf177f505d.Description of Change
Add the missing
Microsoft.Maui.Hostingimport toIssue17210.iOS.cs, introduced by #40072 (0698313d8d9e5ccf1d1f4adabe1fba62699870c7). Its nestedTestApplicationDelegate.CreateMauiApp()returnsMauiApp, 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
Compilevalidation, diagnostic toolchain only: .NET SDK 11.0.100, Apple SDK 27.2, Xcode 27.2 (27B52). The candidate's pinned SDK11.0.101-servicing.26559.106/ Apple 27.0 was unavailable locally. This is not pinned-toolchain certification or a runtime test.MauiAppMauiAppSuccessful diagnostic runs retain the existing
CollectionViewTests.iOS.cs:180CS0618 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):
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.