Skip to content

[ci-fix-net11] Fix CS0115 build error in ModalHandlerTests.SetupBuilder override - #37030

Merged
kubaflo merged 1 commit into
dotnet:net11.0from
HarishwaranVijayakumar:fix/net11-modal-handler-tests-build-error
Aug 3, 2026
Merged

[ci-fix-net11] Fix CS0115 build error in ModalHandlerTests.SetupBuilder override#37030
kubaflo merged 1 commit into
dotnet:net11.0from
HarishwaranVijayakumar:fix/net11-modal-handler-tests-build-error

Conversation

@HarishwaranVijayakumar

Copy link
Copy Markdown
Contributor

Description

This pull request fixes a CS0115 build error on Android caused by a signature mismatch between PR #36328 and PR #36109.

The SetupBuilder method in ModalTests is now protected virtual and accepts an optional includeNavigationViewHandler parameter, which allows subclasses like ModalHandlerTests to override it with the same signature.

Changes

  • ModalTests.cs: Changed SetupBuilder to protected virtual void SetupBuilder(bool includeNavigationViewHandler = true) for better extensibility.
  • ShellHandlerSubclasses.Android.cs: Updated the override in ModalHandlerTests to match the new method signature, ensuring consistency between base and derived test classes.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 37030

Or

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

@azure-pipelines

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

@dotnet-policy-service dotnet-policy-service Bot added the community ✨ Community Contribution label Aug 3, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Hey there @@HarishwaranVijayakumar! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Aug 3, 2026
@sheiksyedm
sheiksyedm marked this pull request as ready for review August 3, 2026 12:02
Copilot AI review requested due to automatic review settings August 3, 2026 12:02
@azure-pipelines

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an Android CS0115 compile error by aligning the ModalHandlerTests override of SetupBuilder with the updated ModalTests.SetupBuilder signature, enabling proper subclass extensibility for device tests.

Changes:

  • Updated ModalTests.SetupBuilder to be protected virtual and keep the optional includeNavigationViewHandler parameter.
  • Updated ModalHandlerTests.SetupBuilder override to match the new base method signature.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Controls/tests/DeviceTests/Elements/Modal/ModalTests.cs Makes SetupBuilder(bool includeNavigationViewHandler = true) protected virtual so derived test classes can override it without signature mismatch.
src/Controls/tests/DeviceTests/Elements/Shell/ShellHandlerSubclasses.Android.cs Updates ModalHandlerTests override to match the base signature, resolving the CS0115 override error on Android.

@sheiksyedm
sheiksyedm requested a review from kubaflo August 3, 2026 12:06
@sheiksyedm sheiksyedm changed the title [net11.0] Fix CS0115 build error in ModalHandlerTests.SetupBuilder override [ci-fix-net11] Fix CS0115 build error in ModalHandlerTests.SetupBuilder override Aug 3, 2026
@kubaflo
kubaflo merged commit 5097c1e into dotnet:net11.0 Aug 3, 2026
13 of 38 checks passed
@github-actions github-actions Bot added this to the .NET 11.0-preview7 milestone Aug 3, 2026
PureWeen pushed a commit that referenced this pull request Aug 3, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Flows the remaining CI fixes discovered while validating the automated
`net11.0` to Preview 7 merge in #36986 back to `net11.0`.

- Adds the missing iOS hosting namespace so the TabbedPage device tests
compile.
- Makes Avalonia template tests skip template post-action restore and
use a test-specific NuGet configuration. Existing approved feeds remain
mapped to all packages; NuGet.org is limited to the external `Avalonia*`
and `MicroCom.*` dependency families.
- Serializes `DispatcherTests` and `MainThreadBridgeTests`, which both
mutate the process-global `DispatcherProvider`, preventing the Helix
race observed in build 1536641.

The modal device-test override fix was removed from this PR after it
landed independently in #37030.

These remaining fixes produced a successful aggregate `maui-pr` run for
#36986 in [build
1536659](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1536659).

The source-only version-property merge hardening remains separately
tracked by #37019.

## Testing

- `Core.UnitTests`: 22 targeted `DispatcherTests` and
`MainThreadBridgeTests` passed on .NET 11 RC1 after rebasing.
- iOS device-test compilation was validated while fixing #36986.
- Avalonia integration scenarios restored through the restricted
package-source mapping in successful `maui-pr` build 1536659.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Vally Fixture <vally-fixture@example.invalid>
Copilot-Session: 37faae15-0e4c-46fd-9bef-f3006c8aaee8
Vignesh-SF3580 pushed a commit to Vignesh-SF3580/maui that referenced this pull request Aug 10, 2026
…er override (dotnet#37030)

## Description

This pull request fixes a `CS0115` build error on Android caused by a
signature mismatch between PR dotnet#36328 and PR dotnet#36109.

The `SetupBuilder` method in `ModalTests` is now `protected virtual` and
accepts an optional `includeNavigationViewHandler` parameter, which
allows subclasses like `ModalHandlerTests` to override it with the same
signature.

### Changes

- **ModalTests.cs**: Changed `SetupBuilder` to `protected virtual void
SetupBuilder(bool includeNavigationViewHandler = true)` for better
extensibility.
- **ShellHandlerSubclasses.Android.cs**: Updated the override in
`ModalHandlerTests` to match the new method signature, ensuring
consistency between base and derived test classes.

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

## Description

Flows the remaining CI fixes discovered while validating the automated
`net11.0` to Preview 7 merge in dotnet#36986 back to `net11.0`.

- Adds the missing iOS hosting namespace so the TabbedPage device tests
compile.
- Makes Avalonia template tests skip template post-action restore and
use a test-specific NuGet configuration. Existing approved feeds remain
mapped to all packages; NuGet.org is limited to the external `Avalonia*`
and `MicroCom.*` dependency families.
- Serializes `DispatcherTests` and `MainThreadBridgeTests`, which both
mutate the process-global `DispatcherProvider`, preventing the Helix
race observed in build 1536641.

The modal device-test override fix was removed from this PR after it
landed independently in dotnet#37030.

These remaining fixes produced a successful aggregate `maui-pr` run for
dotnet#36986 in [build
1536659](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1536659).

The source-only version-property merge hardening remains separately
tracked by dotnet#37019.

## Testing

- `Core.UnitTests`: 22 targeted `DispatcherTests` and
`MainThreadBridgeTests` passed on .NET 11 RC1 after rebasing.
- iOS device-test compilation was validated while fixing dotnet#36986.
- Avalonia integration scenarios restored through the restricted
package-source mapping in successful `maui-pr` build 1536659.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Vally Fixture <vally-fixture@example.invalid>
Copilot-Session: 37faae15-0e4c-46fd-9bef-f3006c8aaee8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-modal area-testing Unit tests, device tests community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants