Skip to content

[automated] Merge branch 'main' => 'net11.0'#34252

Merged
PureWeen merged 10 commits intonet11.0from
merge/main-to-net11.0
Feb 26, 2026
Merged

[automated] Merge branch 'main' => 'net11.0'#34252
PureWeen merged 10 commits intonet11.0from
merge/main-to-net11.0

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

I detected changes in the main branch which have not been merged yet to net11.0. I'm a robot and am configured to help you automatically keep net11.0 up to date, so I've opened this PR.

This PR merges commits made on main by the following committers:

  • StephaneDelcroix
  • jonathanpeppers
  • jfversluis
  • TamilarasanSF4853
  • rmarinho

Instructions for merging from UI

This PR will not be auto-merged. When pull request checks pass, complete this PR by creating a merge commit, not a squash or rebase commit.

merge button instructions

If this repo does not allow creating merge commits from the GitHub UI, use command line instructions.

Instructions for merging via command line

Run these commands to merge this pull request from the command line.

git fetch
git checkout main
git pull --ff-only
git checkout net11.0
git pull --ff-only
git merge --no-ff main

# If there are merge conflicts, resolve them and then run git merge --continue to complete the merge
# Pushing the changes to the PR branch will re-trigger PR validation.
git push https://github.com/dotnet/maui HEAD:merge/main-to-net11.0
or if you are using SSH
git push git@github.com:dotnet/maui HEAD:merge/main-to-net11.0

After PR checks are complete push the branch

git push

Instructions for resolving conflicts

⚠️ If there are merge conflicts, you will need to resolve them manually before merging. You can do this using GitHub or using the command line.

Instructions for updating this pull request

Contributors to this repo have permission update this pull request by pushing to the branch 'merge/main-to-net11.0'. This can be done to resolve conflicts or make other changes to this pull request before it is merged.
The provided examples assume that the remote is named 'origin'. If you have a different remote name, please replace 'origin' with the name of your remote.

git fetch
git checkout -b merge/main-to-net11.0 origin/net11.0
git pull https://github.com/dotnet/maui merge/main-to-net11.0
(make changes)
git commit -m "Updated PR with my changes"
git push https://github.com/dotnet/maui HEAD:merge/main-to-net11.0
or if you are using SSH
git fetch
git checkout -b merge/main-to-net11.0 origin/net11.0
git pull git@github.com:dotnet/maui merge/main-to-net11.0
(make changes)
git commit -m "Updated PR with my changes"
git push git@github.com:dotnet/maui HEAD:merge/main-to-net11.0

Contact .NET Core Engineering (dotnet/dnceng) if you have questions or issues.
Also, if this PR was generated incorrectly, help us fix it. See https://github.com/dotnet/arcade/blob/main/.github/workflows/scripts/inter-branch-merge.ps1.

rmarinho and others added 10 commits February 23, 2026 15:15
### Description of Change

This pull request updates the CI pipeline configuration to introduce and
use a new Linux-based pool for running Android tests, replacing the
previous macOS-based pools. The main changes are the addition of the
`AndroidPoolLinux` parameter and updating the relevant test stage to use
this new pool.

**Pipeline configuration updates:**

* Added a new `AndroidPoolLinux` parameter to `parameters:` in
`eng/pipelines/ci.yml` for specifying a Linux pool (`MAUI-DNCENG`) with
the `1ESPT-Ubuntu22.04` image for Android test runs.
* Updated the `mac_runandroid_tests` stage to use the new
`AndroidPoolLinux` pool instead of the previous macOS-based pools,
ensuring Android tests run on Linux infrastructure.

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rmarinho <1235097+rmarinho@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… Change (#32889)

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

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

### Issue Details
- When TextColor is not specified and the theme is switched between dark
and light (and vice versa), the clearButton color in the Entry does not
update correctly.

### Root cause
- On iOS, The root cause of the issue is that on iOS, when the text
color is null, the clearButton.SetImage method reuses the same image
created in the light theme. This breaks iOS’s automatic theme handling,
causing the clear button color to remain unchanged.
- On Android, When entry.TextColor is null (default), the clear button
drawable's color filter was being cleared without applying the
appropriate theme color, making the button invisible on dark
backgrounds.

### Description of Change

- On Android, When TextColor is `null`, now properly retrieves the
system's `TextColorPrimary` attribute. Applies the correct color filter
to the clear button drawable. Respects the app theme by using the
enabled state color from the theme's color state list
- On iOS, When TextColor is `null`, now sets `clearButton.TintColor =
null` to use system default. Allows the clear button to adapt to the
current theme automatically. Ensures tinted clear button image uses
correct system colors

Validated the behaviour in the following platforms

- [x] Android
- [x] Windows ,
- [x] iOS,
- [x] MacOS

### Issues Fixed
Fixes #32886

### Output images
Android

<table>
<tr>
<td>
Before
</td>
<td>
After
</td>
</tr>
<tr>
<td>



https://github.com/user-attachments/assets/cde1145b-1440-442f-9cca-f7a2790500ab
</td>
<td>


https://github.com/user-attachments/assets/b072641b-182f-4189-843f-589261da90cc
</td>
</tr>
</table>
…#33198)

Updates the scripts to use the new Azure DevOps instance.

After this we can enable the dogfooding comment again so people can test
PRs easier.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
These likely came over from the migration from xamarin/Xamarin.Forms ->
dotnet/maui.

`$(DebugType)=full` seems be causing the error at:

* #34201

```
    src\Controls\tests\Xaml.UnitTests\Issues\Gh2007.rtxc.xaml(3,9): XamlC warning XC0022: Binding could be compiled to improve runtime performance if x:DataType is specified. See https://learn.microsoft.com/dotnet/maui/fundamentals/data-binding/compiled-bindings for more information. [D:\a\_work\1\s\src\Controls\tests\Xaml.UnitTests\Controls.Xaml.UnitTests.csproj]
    Fatal error.
    0xC0000005
    at Mono.Cecil.Pdb.ISymUnmanagedWriter2.Close()
    at Mono.Cecil.Pdb.SymWriter.Close()
    at Mono.Cecil.Pdb.NativePdbWriter.Write()
    at Mono.Cecil.ModuleWriter.Write(Mono.Cecil.ModuleDefinition, Mono.Disposable`1<System.IO.Stream>, Mono.Cecil.WriterParameters)
    at Mono.Cecil.ModuleWriter.WriteModule(Mono.Cecil.ModuleDefinition, Mono.Disposable`1<System.IO.Stream>, Mono.Cecil.WriterParameters)
    at Mono.Cecil.ModuleDefinition.Write(System.IO.Stream, Mono.Cecil.WriterParameters)
    at Mono.Cecil.ModuleDefinition.Write(Mono.Cecil.WriterParameters)
    at Mono.Cecil.AssemblyDefinition.Write(Mono.Cecil.WriterParameters)
    at Microsoft.Maui.Controls.Build.Tasks.XamlCTask.Execute(System.Collections.Generic.IList`1<System.Exception> ByRef)
    at Microsoft.Maui.Controls.Build.Tasks.XamlTask.Execute()
    at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__25.MoveNext()
    at Microsoft.Build.BackEnd.TaskBuilder+<InitializeAndExecuteTask>d__23.MoveNext()
    at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Build.BackEnd.TaskBuilder+<InitializeAndExecuteTask>d__23, Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<InitializeAndExecuteTask>d__23 ByRef)
    at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteBucket>d__19.MoveNext()
    at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteTask>d__18.MoveNext()
    at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteTask>d__13.MoveNext()
    at Microsoft.Build.BackEnd.TargetEntry+<ProcessBucket>d__50.MoveNext()
    at Microsoft.Build.BackEnd.TargetEntry+<ExecuteTarget>d__43.MoveNext()
    at Microsoft.Build.BackEnd.TargetBuilder+<ProcessTargetStack>d__24.MoveNext()
    at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
    at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.Build.BackEnd.TargetBuilder+<ProcessTargetStack>d__24, Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
    at System.Threading.Tasks.TaskSchedulerAwaitTaskContinuation+<>c.<Run>b__2_0(System.Object)
    at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread)
    at System.Threading.Tasks.Task.ExecuteEntry()
    at Microsoft.Build.BackEnd.RequestBuilder+DedicatedThreadsTaskScheduler.<InjectThread>b__6_0()
    at System.Threading.Thread+StartHelper.Callback(System.Object)
    at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
    at System.Threading.Thread.StartCallback()
    Build failed with exit code 57005. Check errors above.
```

We shouldn't be using Windows-specific debug settings in a
cross-platform project -- the `$(DebugType)` setting is not needed.

I went through a couple projects and found old debugging settings that
would have been needed in non-SDK-style projects, but are not needed in
SDK-style projects. Removing those settings to cleanup the repo.
…space (#34055)

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

Fixes #34039

When `<Setter.Value>` is used as a property element, `GetValueNode()` in
`SetterValueProvider.cs` looked up the `Value` property only by two
specific namespace URIs (`""` and `MauiUri`). When the property element
resolved to `MauiGlobalUri` instead, the lookup returned null. Since PR
#33681 changed the null-return behavior to a skip sentinel, this caused
the Setter to be removed from `Variables` entirely, preventing the
`.Add()` call from being generated.

### Root Cause

`GetValueNode()` checked only two namespace URIs:
```csharp
node.Properties.TryGetValue(new XmlName("", "Value"), out valueNode)
node.Properties.TryGetValue(new XmlName(XamlParser.MauiUri, "Value"), out valueNode)
```

Property elements like `<Setter.Value>` inherit their namespace URI from
the XML reader, which varies depending on the xmlns declaration used.
When the XAML used `MauiGlobalUri`, neither existing check matched, so
`GetValueNode()` returned null, triggering the skip sentinel introduced
in #33681, which suppressed the `Setters.Add()` call.

### Fix

Added `MauiGlobalUri` as a third namespace to check in the
`GetValueNode()` lookup chain:

```csharp
!node.Properties.TryGetValue(new XmlName("", "Value"), out valueNode) &&
!node.Properties.TryGetValue(new XmlName(XamlParser.MauiUri, "Value"), out valueNode) &&
!node.Properties.TryGetValue(new XmlName(XamlParser.MauiGlobalUri, "Value"), out valueNode) &&
```

### Testing

- Added XAML unit test (`Maui34039`) verifying Setter with property
element value in a Trigger
- Added SourceGen unit test (`SetterValueInTrigger`) verifying correct
codegen
- Tests fail without fix, pass with fix

---------

Co-authored-by: Copilot <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!

## Summary
- fix SourceGen handling for `<OnPlatform x:TypeArguments="View">` when
no matching platform/default exists
- avoid nullability and null-dereference codegen by using `default!` for
reference-type placeholders
- skip namescope/source-info operations for OnPlatform default
placeholder nodes
- add regression coverage for the View OnPlatform missing-platform
scenario

## Related issues
- Fixes #34074

## Validation
- `dotnet test
src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj
--filter
"SimplifyOnPlatform.OnPlatformWithMissingTargetPlatformShouldUseDefault|SimplifyOnPlatform.OnPlatformViewWithMissingTargetPlatformShouldNotEmitNullabilityWarnings"`

---------

Co-authored-by: Copilot <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!

## Description
Fixes two SourceGen nullability issues reported in #34130:

- avoid nullable-unboxing warnings by null-forgiving
`IExtendedTypeConverter` results before value-type casts
- preserve nullable generic type arguments in BindingSourceGen type
names while avoiding invalid nullable top-level type syntax

Also adds `Maui34130` Xaml.UnitTest coverage across Runtime and
SourceGen inflators.

## Validation
- `dotnet build
src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj -nologo
-v minimal`
- `dotnet test
src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj
--filter "FullyQualifiedName~Maui34130" -nologo -v minimal`

## fixes
- fixes #34130

---------

Co-authored-by: Copilot <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!

## Summary
- fix RelayCommand inference for generated command properties when
source methods use `On*`, `*Async`, or `On*Async` naming
- prevent MAUIG2045 false positives for compiled bindings that target
those generated command properties
- add regression coverage in BindingSourceGen and SourceGen unit tests

## Related issues
- Fixes #34029
- Duplicate issue #34086 was closed in favor of #34029

## Validation
- `dotnet test
src/Controls/tests/BindingSourceGen.UnitTests/Controls.BindingSourceGen.UnitTests.csproj
--filter
"RelayCommandTests.DetectsRelayCommandMethodWithOnPrefixAndAsyncSuffix"`
- `dotnet test
src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj
--filter
"BindingDiagnosticsTests.BindingToRelayCommandGeneratedFromOnAsyncMethod_DoesNotReportPropertyNotFound"`

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…es (#33963)

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

Adds rule #2 to the Git Workflow section in copilot-instructions.md:

**When fixing CI or amending an existing PR, commit directly to the PR
branch.** Do not create a separate branch off a PR branch — the PR
branch already IS a feature branch. Creating a new branch means CI will
not run on the PR, defeating the purpose.

Also adds a code example showing the correct workflow (`gh pr checkout`
→ commit → push).

## Motivation

Copilot CLI was incorrectly creating separate branches when asked to fix
CI on existing PRs, because rule #1 ("never commit to main, create a
feature branch") was being over-generalized to PR branches. This caused
wasted time since CI only runs on PR branches.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
Reset patterns:
- global.json
- NuGet.config
- eng/Version.Details.xml
- eng/Versions.props
- eng/common/*
@PureWeen
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen merged commit 288c464 into net11.0 Feb 26, 2026
171 of 182 checks passed
@PureWeen PureWeen deleted the merge/main-to-net11.0 branch February 26, 2026 17:36
StephaneDelcroix added a commit that referenced this pull request Feb 27, 2026
Remove two extra duplicate AndroidPoolLinux parameter definitions
introduced by automated merge (#34252). Azure DevOps rejects duplicate
YAML parameters, breaking all PR builds targeting net11.0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants