Skip to content

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

Merged
rolfbjarne merged 55 commits intonet11.0from
merge/main-to-net11.0
Apr 24, 2026
Merged

[automated] Merge branch 'main' => 'net11.0'#25151
rolfbjarne merged 55 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:

  • rolfbjarne

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/macios HEAD:merge/main-to-net11.0
or if you are using SSH
git push git@github.com:dotnet/macios 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/macios merge/main-to-net11.0
(make changes)
git commit -m "Updated PR with my changes"
git push https://github.com/dotnet/macios 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/macios merge/main-to-net11.0
(make changes)
git commit -m "Updated PR with my changes"
git push git@github.com:dotnet/macios 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.

rolfbjarne and others added 4 commits April 14, 2026 12:13
…en applying the [Preserve] attribute. (#25109)

Create an xml descriptor file instead of manually marking when applying the [Preserve] attribute.

I first tried using [DynamicDependency] attributes, but it turns out [DynamicDependency] attributes can't accurately express/replace [Preserve] semantics, so I went with an xml descriptor file instead.

The [DynamicDependency] attribute code is still present, as an opt-in, because it was already there used for NativeAOT (even though we're always using the xml descriptor logic now, even for NativeAOT).

This makes it easier to move this code out of a custom linker step in the future.

Also move the removal of any [Preserve] attributes to the RemoveAttributes step.

Contributes towards #17693.
…e simulator. Fixes #25112. (#25129)

In the GetMlaunchArguments task, instead of repeating what the GetAvailableDevices task does, just run the GetAvailableDevices task and pass the resulting devices to the GetMlaunchArguments task. Then GetMlaunchArguments can just pick the first applicable one, which should work fine.

Fixes #25112.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…marking when marking static registrar methods. (#25018)

This makes it easier to move this code out of a custom linker step in the future.

Contributes towards #17693.
Reset patterns:
- global.json
- NuGet.config
- eng/Version.Details.xml
- eng/Version.Details.props
- eng/common/*
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne enabled auto-merge April 15, 2026 05:46
rolfbjarne and others added 2 commits April 15, 2026 07:47
#25150)

xharness regressed detecting crashing tests as crashing (dotnet/xharness@a6f9fe6),
so clone the TestReporter class and modify it to properly detect crashes and report
them as such.

---------

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

Azure Pipelines:
2 pipeline(s) require an authorized user to comment /azp run to run.

…e hosts. (#25147)

Pinging localhost doesn't work for me, so try pinging a few other hosts as
well, and pass the test if any ping succeeds.

Also add a timeout, so the entire test run doesn't fail if a ping blocks for
some reason.
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

This pull request updates the following dependencies

## From https://github.com/dotnet/dotnet

- **Subscription**: [30303172-6f12-44a9-887a-ea8520fce068](https://maestro.dot.net/subscriptions?search=30303172-6f12-44a9-887a-ea8520fce068)
- **Build**: [20260413.4](https://dev.azure.com/dnceng/internal/_build/results?buildId=2949726) ([310341](https://maestro.dot.net/channel/9626/github:dotnet:dotnet/build/310341))
- **Date Produced**: April 14, 2026 10:22:10 PM UTC
- **Commit**: [2476be2e45bb47d8dd6604fac803cef03198f2a7](dotnet/dotnet@2476be2)
- **Branch**: [release/10.0.3xx](https://github.com/dotnet/dotnet/tree/release/10.0.3xx)

- **Dependency Updates**:
  - From [10.0.0-beta.26208.105 to 10.0.0-beta.26213.104][3]
     - Microsoft.DotNet.Arcade.Sdk
     - Microsoft.DotNet.Build.Tasks.Feed
     - Microsoft.DotNet.SharedFramework.Sdk
  - From [10.0.300-preview.0.26208.105 to 10.0.300-preview.0.26213.104][3]
     - Microsoft.NET.Sdk
  - From [10.0.300-preview.26208.105 to 10.0.300-preview.26213.104][3]
     - Microsoft.TemplateEngine.Authoring.Tasks

[3]: dotnet/dotnet@b510aa8...2476be2
This pull request updates the following dependencies

## From https://github.com/dotnet/xharness

- **Subscription**: [02e03784-16b3-4ced-b02a-3715797fc7da](https://maestro.dot.net/subscriptions?search=02e03784-16b3-4ced-b02a-3715797fc7da)
- **Build**: [20260414.1](https://dev.azure.com/dnceng/internal/_build/results?buildId=2950778) ([310284](https://maestro.dot.net/channel/2/github:dotnet:xharness/build/310284))
- **Date Produced**: April 14, 2026 2:47:53 PM UTC
- **Commit**: [84f48de9bd52fdee2a3b42e45e0b21b79413005e](dotnet/xharness@84f48de)
- **Branch**: [main](https://github.com/dotnet/xharness/tree/main)

- **Dependency Updates**:
  - From [11.0.0-prerelease.26204.1 to 11.0.0-prerelease.26214.1][1]
     - Microsoft.DotNet.XHarness.iOS.Shared

[1]: dotnet/xharness@0668c80...84f48de
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

…#25164)

XML doc comment in `src/CoreSpotlight/CSEnums.cs` line 20 reads `An
unknown error occured`. Fixed to `occurred`. Comment-only change.

Signed-off-by: SAY-5 <SAY-5@users.noreply.github.com>
Co-authored-by: SAY-5 <SAY-5@users.noreply.github.com>
@vs-mobiletools-engineering-service2

This comment has been minimized.

Also remove the tests, they're not running and have bitrotted.
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

rolfbjarne and others added 3 commits April 22, 2026 11:38
…marking of NSObjects. (#25146)

Add a new `MarkNSObjectsStep` step that runs before the mark stage in the trimmer, which uses `[DynamicDependency]` attributes to ensure `NSObject` subclasses aren't trimmed away when they shouldn't be. The logic is identical to the existing `MarkNSObjects` sub step, except `MarkNSObjects` directly marks APIs. The advantage is that the new step can easily be moved out of the trimmer (which will be done in a later stage).

The new behavior is the default, but keep the old behavior behind an opt-out flag for now.

Also update the preservation code to not handle "Xamarin.iOS.dll" or "Xamarin.Forms.Platform.iOS",
since those assemblies aren't used anymore.

This makes it easier to move this code out of a custom linker step in the future.

There's one non-obvious part here: I had to move `Class.ValidateObjectPointers` to the `Runtime` class, because now the `Class` type's `IsBeforeFieldInit` flag is `false` (because otherwise the trimmer doesn't honor the `[DynamicDependency]` attributes we're now adding to the `Class`'s static cctor), and then the trimmer deems the static cctor as having side effects:

https://github.com/dotnet/runtime/blob/16b9ae91f456c65ffcc5b28afc97034d828a19ad/src/tools/illink/src/linker/Linker.Steps/UnreachableBlocksOptimizer.cs#L268

and it refuses to inline anything:

https://github.com/dotnet/runtime/blob/16b9ae91f456c65ffcc5b28afc97034d828a19ad/src/tools/illink/src/linker/Linker.Steps/UnreachableBlocksOptimizer.cs#L526-L529

Contributes towards #17693.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
NSUrlSessionHandler was explicitly rejecting HTTP digest challenges by mapping NSURLAuthenticationMethodHTTPDigest to the internal reject sentinel. That meant iOS never answered digest auth challenges with configured credentials, while other supported auth schemes did.

Handle digest challenges like other credential-backed auth methods so Credentials.GetCredential can return a NetworkCredential and the handler can respond with an NSUrlCredential.

Add a System.Net.Http regression test covering successful and failed digest authentication, and add a shared httpbin helper for the digest auth endpoint.

Recreated from #25179 (by @mandel-macaque) to not use a fork.

---------

Co-authored-by: Manuel de la Pena <mandel@themacaque.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

🔥 [CI Build #14a851f] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

0 tests crashed, 16 tests failed, 145 tests passed.

Failures

❌ monotouch tests (iOS) [attempt 2]

15 tests failed, 0 tests passed.

Failed tests

  • monotouch-test/iOS - simulator/Debug: LaunchTimedOut
  • monotouch-test/iOS - simulator/Debug (CoreCLR): LaunchTimedOut
  • monotouch-test/iOS - simulator/Release (CoreCLR, ARM64): LaunchTimedOut
  • monotouch-test/iOS - simulator/Release (CoreCLR, x64): LaunchTimedOut
  • monotouch-test/iOS - simulator/Release (CoreCLR, Universal): LaunchTimedOut
  • monotouch-test/iOS - simulator/Debug (LinkSdk): LaunchTimedOut
  • monotouch-test/iOS - simulator/Debug (static registrar): LaunchTimedOut
  • monotouch-test/iOS - simulator/Release (all optimizations): LaunchTimedOut
  • monotouch-test/iOS - simulator/Debug (ARM64): LaunchTimedOut
  • monotouch-test/iOS - simulator/Release (NativeAOT, ARM64): LaunchTimedOut
  • monotouch-test/iOS - simulator/Debug (managed static registrar): LaunchTimedOut
  • monotouch-test/iOS - simulator/Release (managed static registrar, all optimizations): LaunchTimedOut
  • monotouch-test/iOS - simulator/Release (NativeAOT, x64): LaunchTimedOut
  • monotouch-test/iOS - simulator/Debug (interpreter): LaunchTimedOut
  • monotouch-test/iOS - simulator/Release (interpreter): LaunchTimedOut

Html Report (VSDrops) Download

❌ windows tests [attempt 2]

1 tests failed, 2 tests passed.

Failed tests

  • Remote .NET tests/Xamarin.Tests.DotNetProjectTest.PublishAotOnWindows(iOS,"ios-arm64","Release"): Failed: 'dotnet build' timed out after 00:10:00

Html Report (VSDrops) Download

Successes

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 9 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 19 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 12 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 15 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: 14a851fe07e8970e62d91af3377dbb8f71b6764e [PR build]

rolfbjarne and others added 11 commits April 22, 2026 21:39
…25211)

Without an explicit trigger section, Azure DevOps defaults to enabling
CI triggers on all branches. This causes duplicate builds when a branch
(e.g. darc-main-*) has an open PR — one from the implicit CI trigger
and one from the PR trigger.

Adding 'trigger: none' ensures only PR-triggered builds run.

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

This step has taken to hanging recently, and it'll hang until the job's
timeout of 3 hours is hit, at which point it'll mark the entire job as failed.

So add a timeout just for this step, so that it can timeout by itself, and
then the job can finish successfully.
Create a Copilot skill that reviews PRs against conventions distilled from
past reviews by senior maintainers (Sebastien, Rolf, Chris, Manuel, Alex).

Covers:
- Binding definitions (Export selectors, NullAllowed, platform attributes,
  naming conventions, protocol patterns, breaking change guards)
- MSBuild tasks and targets (Required properties, incremental builds,
  SessionId for remote execution)
- Nullable reference types (no null-forgiving operator, ThrowIfNull)
- Formatting (Mono style with tabs, space before parens)
- Memory management (GC.KeepAlive, Dispose patterns, SIMD marshalling)
- Performance, security, testing, and AI-specific pitfalls

Modelled after dotnet/android's reviewer skill with rules adapted
for this repository's Apple platform binding patterns.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove code we don't use.
* Enable nullability and fix any issues.

---------

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

C# locks are re-entrant, so try to avoid re-entrancy issues by:

* In `RemoveInflightData`: fetch and remove the inflight data in a single
  `Dictionary.Remove` call. This is also faster than doing two dictionary
  lookups.
* In `Dispose`: collect all tasks to cancel and dispose first (inside the
  lock), and then we cancel and dispose after the lock. This hopefully fixes
  #20345 (this solution was tested by a
  customer and apparently worked).

Might fix #20345.
…ely. (#25235)

This is needed when building iOS apps using CoreCLR or NativeAOT
remotely (in
the .NET 11 branch), and I'm adding these changes into main to ease
upcoming
changes to these files in main.

No tests here, but the net11.0 branch already contains tests that will
verify this.

Ref: #24521
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne disabled auto-merge April 24, 2026 15:11
@rolfbjarne rolfbjarne merged commit 9e0c248 into net11.0 Apr 24, 2026
10 checks passed
@rolfbjarne rolfbjarne deleted the merge/main-to-net11.0 branch April 24, 2026 15:12
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.

4 participants