Skip to content

�� Merge 'main' => 'net11.0'#25647

Draft
github-actions[bot] wants to merge 77 commits into
net11.0from
merge/main-to-net11.0-20260604-adc2ddc13d24e505
Draft

�� Merge 'main' => 'net11.0'#25647
github-actions[bot] wants to merge 77 commits into
net11.0from
merge/main-to-net11.0-20260604-adc2ddc13d24e505

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Caution

Protected files were modified in this change.
This pull request is in request_review mode and requires explicit human scrutiny before merge.

Protected files: global.json, .github/skills/update-expected-app-size/SKILL.md, .github/agents/agentic-workflows.agent.md, .github/aw/actions-lock.json, .github/dependabot.yml, .github/workflows/ci-postmortem.lock.yml, .github/workflows/code-radiator.lock.yml, .github/workflows/copilot-setup-steps.yml, .github/workflows/macios-reviewer.lock.yml, .github/workflows/autoformat-v2.yml, .github/workflows/autoformat.yml, .github/workflows/autoformat2.yml, .github/copilot-instructions.md, .github/workflows/code-radiator.md, .github/workflows/inter-branch-merge-flow.yml, .github/workflows/update-single-platform-branches.yml, .github/workflows/yamllint.yml, .github/workflows/zizmor.yml, .github/workflows/maestro-changelog.yml, .github/workflows/ci-postmortem.md

Automated merge of main into net11.0.

Created by the code-radiator workflow.

Merge Details

This merge had conflicts that were resolved:

Auto-resolved conflicts:

  • tests/dotnet/UnitTests/expected/*.txt: Excluded from merge (per policy)
  • eng/Version.Details.props: Merged by selecting higher versions
  • eng/Version.Details.xml: Merged by selecting higher versions
  • NuGet.config: Merged by including all package sources

Manually-resolved conflicts:

  • global.json: Kept net11.0 version (targets .NET 11)
  • runtime/coreclr-bridge.m: Kept net11.0 version (TrackedObjectInfo structure)
  • tests/dotnet/UnitTests/BundleStructureTest.cs: Kept net11.0 version (AddMultiRidAssembly pattern)
  • tools/dotnet-linker/LinkerConfiguration.cs: Kept net11.0 version (Console.WriteLine logging)
  • .github/copilot-instructions.md: Merged both sections (kept MSBuild Targets Pitfalls and FileWrites)
  • msbuild/Xamarin.Localization.MSBuild/MSBStrings.resx: Merged all resource entries

⚠️ Human review required for the manually-resolved conflicts.

Generated by Code Radiator · sonnet45 2.2M ·

rolfbjarne and others added 30 commits May 22, 2026 08:59
…ck to Basic. Fixes #25485. (#25493)

When a server advertises multiple WWW-Authenticate challenges (e.g. Bearer
before Basic), the handler would call PerformDefaultHandling for unrecognized
methods like Bearer. This prevented the system from trying subsequent methods.

Fix by rejecting unrecognized HTTP auth protection spaces, which allows the
URL loading system to try the next advertised authentication method.

Fixes #25485.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Store the super handle in a ConditionalWeakTable.

* Allocate native memory for it.
* Cache that native memory in a ConditionalWeakTable.
* Free it when the NSObject is freed (but not before).
* Obsolete the SuperHandle property in .NET 11, and remove it in XAMCORE_5_0.

This is less performant, but any performance issues will be alleviated by
the fact that NSObject.GetSuper () will be called much less after #25376.

The great advantage is that NSObjectData is now smaller, and fits in the
tagged memory returned by `ObjectiveCMarshal.CreateReferenceTrackingHandle`,
which will simplify memory management _a lot_ for CoreCLR.

Contributes towards #25383.

This is a continuation/simplification of #25405.
…code for what mtouch currently does. (#25430)

mtouch only needs to know the Xcode version to do what it currently does
(create the partial static registrar code during our build), so just pass that
instead of the path to Xcode.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This pull request updates the following dependencies

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

- **Subscription**: [c0371266-dd6f-4959-822b-decc72d2d668](https://maestro.dot.net/subscriptions?search=c0371266-dd6f-4959-822b-decc72d2d668)
- **Build**: [20260521.4](https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=14158846) ([315351](https://maestro.dot.net/channel/3884/github:dotnet:macios/build/315351))
- **Date Produced**: May 21, 2026 2:11:24 PM UTC
- **Commit**: [5a29bbf](5a29bbf)
- **Branch**: [release/9.0.1xx](https://github.com/dotnet/macios/tree/release/9.0.1xx)

- **Dependency Updates**:
  - From [26.5.9002 to 26.5.9003][1]
     - Microsoft.iOS.Sdk.net9.0_26.5
     - Microsoft.MacCatalyst.Sdk.net9.0_26.5
     - Microsoft.macOS.Sdk.net9.0_26.5
     - Microsoft.tvOS.Sdk.net9.0_26.5

[1]: 7075bb3...5a29bbf
## Summary

Lines 23-24 of `docs/guides/HowToBranch.md` incorrectly use `dotnet checkout` instead of `git checkout`. The `dotnet` CLI has no `checkout` subcommand, so anyone following the guide literally would get an error. Later commands in the same document correctly use `git`, confirming this was a typo.

## Changes

- Line 23: `$ dotnet checkout net10.0` → `$ git checkout net10.0`
- Line 24: `$ dotnet checkout -b release/10.0.1xx-preview42` → `$ git checkout -b release/10.0.1xx-preview42`

Markdown-only change — no build or test impact.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Migrate all remaining classic assertions (AreEqual, IsTrue, IsNull, etc.) to
Assert.That constraint syntax.
…25507)

On CoreCLR, the tagged memory returned by ObjectiveCMarshal.CreateReferenceTrackingHandle
is guaranteed to be stable (same pointer per object) and its lifetime is tied to the GC
freeing the instance. This means we can use it directly as our NSObjectData storage,
removing the need for:

- The TrackedObjectInfo indirection struct (both in C# and native code).
- The ConditionalWeakTable<NSObject, NSObjectDataHandle> used to prevent premature
  collection of separately-allocated native memory.
- The Interlocked.CompareExchange synchronization (since the pointer is always the same).

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The current script breaks the build:

   + ssh-keygen -R github.com
   Cannot stat /Users/builder/.ssh/known_hosts: No such file or directory
   ##[error]Bash exited with code '255'.

The script was added over three years ago, and all our bots have been
re-imaged multiple times since then, thus this isn't an issue anymore.

So just remove the script.
…25482)

When app size tests fail in Azure DevOps, write the updated expected files to `$(Build.ArtifactStagingDirectory)/updated-expected-sizes/` so they get published as a pipeline artifact. This makes it easy to download and apply the corrected files without having to reproduce the build locally.

Also add a Copilot skill that can fetch the artifacts and apply them locally.

Changes:
- **AppSizeTest.cs**: When differences are detected (either app size exceeds tolerance OR the file list changed), write the updated expected file to the artifact staging directory. Falls back to a temp directory when not running in CI.
- **run-tests.yml**: Add a `PublishPipelineArtifact@1` step to upload the `updated-expected-sizes` directory after tests complete.
- **Tolerance fix**: Previously, artifacts were only uploaded when the total app size exceeded tolerance. If files were added/removed from the bundle but the total size stayed within tolerance, no artifact was produced. Now both size and file-list changes trigger artifact upload.
- **Expected file updates**: Update expected files to match current CI output.
- **Copilot skill** (`.github/skills/update-expected-app-size/`): Helps download these artifacts from Azure DevOps and apply them locally.

🤖 Pull request created by Copilot

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add support for an MSBuild property ('XcodeLocation') to set the Xcode location.
* Use a new facility in macios-devtools (the 'XcodeLocator' class) to find Xcode. This required a bump to the corresponding submodule.
* Deprecate the file-based locations.
* Always set DEVELOPER_DIR when executing subprocesses.
* Don't use static state to store the Xcode location. This fixes a problem where the static state would remain in memory when MSBuild's build server is being used, and then we'd do the wrong thing when building a different project using a different version of Xcode.

Misc improvements:

* We now warn if the selected Xcode is a symlink (ref: #21762).
* The settings files are deprecated, and won't be used in .NET 11 (we'll warn about this in .NET 10).
* The environment variable MD_APPLE_SDK_ROOT is deprecated, and won't be used in .NET 11 (we'll warn about this in .NET 10).

This will hopefully remove some confusion about which Xcode is being used; now we just look at the system's Xcode, unless it's overridden by the MSBuild property 'XcodeLocation'.

Fixes #3931.
Fixes #11172.
Fixes #21762.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rokvin@microsoft.com>
…eaning (#25508)

## Summary

Line 23 of `docs/os-onboarding.md` was missing the word "don't", which reversed the intended meaning of the sentence.

**Before:** "even if we bind any of the new APIs"
**After:** "even if we **don't** bind any of the new APIs"

The sentence explains that releasing support for a new OS version is technically optional because bindings aren't strictly required — the missing negation made it say the opposite.

## Changes

- `docs/os-onboarding.md`: Inserted missing "don't" on line 23

Single-word typo fix, no functional code changes.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Create a new autoformat workflow that avoids the security concerns
flagged by zizmor in the existing autoformat.yml + autoformat2.yml:

- No workflow_run trigger (eliminates dangerous-triggers)
- All actions pinned to SHA hashes (eliminates unpinned-uses)
- persist-credentials: false on checkout (eliminates artipacked)
- Job-level permissions (eliminates excessive-permissions)

Two jobs handle same-repo and fork PRs differently:
- Same-repo: format + commit + push directly
- Fork: format + upload patch as artifact

All logic is inlined (no rolfbjarne/autoformat references).

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…[Intrinsic]. (#25318)

## Summary

Adds a new trimmer step that inlines calls to `Class.GetHandle` (and `Class.GetHandleIntrinsic`) with direct native references to Objective-C classes. This is a companion feature to the existing `InlineDlfcnMethods` step, and together they enable the linker to replace managed dictionary lookups with direct native symbol references that are resolved at native link time.

## Motivation

`Class.GetHandle ("ClassName")` calls go through a managed dictionary lookup at runtime. By inlining these calls, we:

1. **Improve startup performance** — eliminates dictionary lookups for class handles.
2. **Enable dead-code elimination** — the native linker can strip unreferenced class references, reducing binary size.
3. **Support NativeAOT** — ensures class references survive the NativeAOT compilation pipeline without relying on reflection-based discovery.

## Design

The feature works in two modes controlled by the `InlineClassGetHandle` MSBuild property:

- **`compatibility`** (default for IL trimming on .NET 11+): Rewrites `Class.GetHandle` calls to P/Invoke wrappers, then generates native code for all surviving wrappers after trimming. Falls back to `objc_getClass` at runtime for missing classes.
- **`strict`** (default for NativeAOT on .NET 11+): Same rewriting, but does not generate runtime fallbacks — missing classes produce a build error.

### Pipeline

1. **ILTrim phase** (`InlineClassGetHandleStep`): Rewrites `Class.GetHandle`/`GetHandleIntrinsic` calls to generated P/Invoke methods.
2. **Type map generation** (`CoreTypeMapStep`): Emits class metadata (framework, introduced version, wrapper status) used by post-trim code generation.
3. **Post-trim processing** (`PostTrimmingProcessing` MSBuild task): Collects surviving class references from trimmed assemblies, generates native source files with `@interface` forward declarations and wrapper functions.
4. **NativeAOT path** (`CollectUnresolvedNativeSymbols` + `ComputeNativeAOTSurvivingNativeSymbols`): Extracts unresolved symbols from NativeAOT output and generates native code for surviving references only.

## Changes

- **New linker steps**: `InlineClassGetHandleStep`, `GenerateInlinedClassGetHandleCodeStep`, updated `CoreTypeMapStep`.
- **New MSBuild tasks**: `PostTrimmingProcessing` (generates native code), `CollectUnresolvedNativeSymbols`, `ComputeNativeAOTSurvivingNativeSymbols`, `CollectPostILTrimInformation`.
- **Shared utilities**: `FileUtils.WriteIfDifferent`, `MachO` unresolved symbol extraction, framework lookup helpers.
- **MSBuild integration**: New properties (`InlineClassGetHandle`), targets for post-trim native code generation and compilation.
- **Tests**: New test variations (`inline-class-gethandle-compat`, `inline-class-gethandle-strict`) for both ILTrim and NativeAOT paths.
- **Documentation**: `docs/code/class-handles.md`, `docs/building-apps/build-properties.md` updated.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…25529)

This change updates NSUrlSessionHandler redirect auth handling so it
matches the .NET handlers more closely, this is just for .NET
compatibility and for correctness; there's no security enforcement here.
After an automatic redirect credentials are now resolved against the
current redirect target Url instead of the orginal request Url. Also,
non CredentialCache credentials are not reused across redirects by
default, which is consistent with `SocketsHttpHandler` and
`WinHttpHandler`. This avoids sending credentials that were scoped, or
only meant for the original origin, to a redirected destination.
CredentialCache entries still work when they are explicitly scoped for
the redirect target.
Remove the dead zero-copy string marshaling code from the binding generator.

This feature was never fully working, because it never really worked well (it ran into a number of bugs in other places, causing crashes because APIs would retain or copy NSStrings when they shouldn't and this optimization would run head-first into those).

Note that this option never did anything in .NET, it was always forcefully disabled if someone tried to enable it.

## Changes

- Remove `ZeroCopyStrings` field, `type_wants_zero_copy`, `ZeroCopyStringMarshal`, `CollectFastStringMarshalParameters`, and all zero-copy code paths from the generator
- Simplify `GenerateMarshalString`/`GenerateDisposeString` (always use the copy path)
- Keep `ZeroCopyStringsAttribute` and `DisableZeroCopyAttribute` as no-op stubs wrapped in `#if !XAMCORE_5_0` with `[Obsolete]` for source compatibility
- Guard `--use-zero-copy` CLI option with `#if !XAMCORE_5_0` (emits warning BI1027)
- Mark `ObjCBindings.Property.DisableZeroCopy` enum value as `[Obsolete]`
- Remove `[DisableZeroCopy]` usages from binding sources (glkit, corebluetooth)
- Update documentation to mark both attributes as obsolete

🤖 Pull request created by Copilot

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This pull request updates the following dependencies

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

- **Subscription**: [da09b56a-0fb1-439a-b894-def14d2ec0a4](https://maestro.dot.net/subscriptions?search=da09b56a-0fb1-439a-b894-def14d2ec0a4)
- **Build**: [20260526.20](https://dev.azure.com/dnceng/internal/_build/results?buildId=2984799) ([315942](https://maestro.dot.net/channel/10307/github:dotnet:dotnet/build/315942))
- **Date Produced**: May 27, 2026 1:23:24 AM UTC
- **Commit**: [c9b6c9515ff95716e797906a3eff7179baa272b2](dotnet/dotnet@c9b6c95)
- **Branch**: [release/10.0.4xx](https://github.com/dotnet/dotnet/tree/release/10.0.4xx)

- **Dependency Updates**:
  - From [10.0.0-beta.26270.102 to 10.0.0-beta.26276.120][1]
     - Microsoft.DotNet.Arcade.Sdk
     - Microsoft.DotNet.Build.Tasks.Feed
     - Microsoft.DotNet.SharedFramework.Sdk
  - From [10.0.301-servicing.26270.102 to 10.0.400-preview.0.26276.120][1]
     - Microsoft.NET.Sdk
  - From [10.0.301 to 10.0.400-preview.26276.120][1]
     - Microsoft.TemplateEngine.Authoring.Tasks

[1]: dotnet/dotnet@2970f74...c9b6c95
…25503)

- Remove unused 'using System.Net.Http.Headers' directive.

- Track request counts server-side and assert that at least one
  unauthenticated request was received before the authenticated retry,
  ensuring the test validates the actual challenge/fallback flow.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This pull request updates the following dependencies

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

- **Subscription**: [c0371266-dd6f-4959-822b-decc72d2d668](https://maestro.dot.net/subscriptions?search=c0371266-dd6f-4959-822b-decc72d2d668)
- **Build**: [20260525.2](https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=14185729) ([315724](https://maestro.dot.net/channel/3884/github:dotnet:macios/build/315724))
- **Date Produced**: May 25, 2026 9:48:07 AM UTC
- **Commit**: [336ee85](336ee85)
- **Branch**: [release/9.0.1xx](https://github.com/dotnet/macios/tree/release/9.0.1xx)

- **Dependency Updates**:
  - From [26.5.9003 to 26.5.9004][1]
     - Microsoft.iOS.Sdk.net9.0_26.5
     - Microsoft.MacCatalyst.Sdk.net9.0_26.5
     - Microsoft.macOS.Sdk.net9.0_26.5
     - Microsoft.tvOS.Sdk.net9.0_26.5

[1]: 5a29bbf...336ee85
…hat as the PR number. (#25517)

There's no need to try to figure out which PR we're working on, if we're told
by using the SYSTEM_PULLREQUEST_PULLREQUESTNUMBER environment variable.
…ching (#25440)

Code Radiator was failing in `safe_outputs` when processing `create_pull_request` for `xcode26.5`, causing code-push output cancellation and masking subsequent `missing_tool` reporting. The root issue was branch-allowlist pattern semantics not matching runtime glob behavior.

- **Safe-output base branch policy update**
  - Updated `safe-outputs.create-pull-request.allowed-base-branches` in `.github/workflows/code-radiator.md` to runtime-compatible globs:
    - `net*.0`
    - `xcode*`
    - `xcode*.*`
  - This preserves support for both major-only and dotted Xcode branches (for example `xcode26` and `xcode26.5`).

- **Workflow lock regeneration**
  - Recompiled `.github/workflows/code-radiator.lock.yml` so generated `create_pull_request.allowed_base_branches` matches source frontmatter.

- **Prompt/body pattern alignment**
  - Updated the workflow’s documented “Target Branch Patterns” in the markdown body to match the same glob set and avoid config/prompt drift.

```yaml
safe-outputs:
  create-pull-request:
    allowed-base-branches:
      - "net*.0"
      - "xcode*"
      - "xcode*.*"
```

---------

Co-authored-by: rolfbjarne <249268+rolfbjarne@users.noreply.github.com>
…1: Build ID 14187915 (#25518)

This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.
…25521)

DocumentationManager.TryGetDocumentation was calling `doc.SelectSingleNode("/doc/members/member[@name='...']")` for every member (~30K calls for tvOS). Each XPath query traverses the entire XML DOM, making this O(n*m) where n=members queried and m=total members.

Replace with a `Dictionary<string, XmlNode>` built once at construction time, giving O(1) lookups thereafter.

Performance (tvOS, wall clock time):
- Before: 270s, peak RSS 363MB
- After: 28s, peak RSS 358MB
- Speedup: 9.6x (242s saved)

Generated code: verified identical (git diff = empty).

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…1: Build ID 14204921 (#25538)

This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.
- Make assertion failure messages context-aware: in CI, mention the build
  artifact; locally, just suggest WRITE_KNOWN_FAILURES=1.
- Gate the PublishPipelineArtifact step on the directory actually existing
  to avoid noisy 'succeeded with issues' when tests pass.
- Fix misleading assertion messages for preserved-API checks: 'No added
  APIs.' → 'Unexpected APIs were added to the preserved set.'
- Fix SKILL.md documentation to show actual artifact naming pattern
  (including uploadPrefix) and realistic file name examples.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…1: Build ID 14204473 (#25535)

This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.
…1: Build ID 14204987 (#25539)

This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.
…1: Build ID 14204841 (#25537)

This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.
…registrar as a custom trimmer step. (#25524)

The InlineClassGetHandle step runs before marking, and the StaticRegistrar
step runs after sweeping, which causes a problem when the InlineClassGetHandle
step needs the registrar to run first.

This won't be a problem once we've moved out of custom trimmer steps.
rolfbjarne and others added 28 commits June 2, 2026 11:31
#25597 (#25604)

The test was getting HTTP 404 on a CI bot, but the local HttpListener
server never returns 404. The likely cause is localhost resolving to
::1 (IPv6) on certain macOS bots while HttpListener with http://*:port/
only binds to IPv4. The request reaches something else and gets 404.

Fix:
- Use 127.0.0.1 explicitly in both the HttpListener prefix and the
  request URL to avoid IPv6/hostname resolution mismatches.
- Add CI tolerance: if the server received zero requests and the status
  is 404, mark the test as inconclusive (infrastructure issue, not a
  code bug).
- Add IgnoreInCIIfBadNetwork and timeout handling consistent with other
  tests in this file.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…20260529053637714 to main (#25575)

LEGO: Pull request from lego/hb_5df43909-4a19-4f55-bc3f-9ea8fccf3c82_20260529053637714 to main with localized lcls
This pull request updates the following dependencies

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

- **Subscription**: [da09b56a-0fb1-439a-b894-def14d2ec0a4](https://maestro.dot.net/subscriptions?search=da09b56a-0fb1-439a-b894-def14d2ec0a4)
- **Build**: [20260531.4](https://dev.azure.com/dnceng/internal/_build/results?buildId=2988460) ([316516](https://maestro.dot.net/channel/10307/github:dotnet:dotnet/build/316516))
- **Date Produced**: May 31, 2026 7:18:38 PM UTC
- **Commit**: [aec921632e75e1f29327709dd52e98c41f3b55cf](dotnet/dotnet@aec9216)
- **Branch**: [release/10.0.4xx](https://github.com/dotnet/dotnet/tree/release/10.0.4xx)

- **Dependency Updates**:
  - From [10.0.0-beta.26277.109 to 10.0.0-beta.26281.104][2]
     - Microsoft.DotNet.Arcade.Sdk
     - Microsoft.DotNet.Build.Tasks.Feed
     - Microsoft.DotNet.SharedFramework.Sdk
  - From [10.0.400-preview.0.26277.109 to 10.0.400-preview.0.26281.104][2]
     - Microsoft.NET.Sdk
  - From [10.0.400-preview.26277.109 to 10.0.400-preview.26281.104][2]
     - Microsoft.TemplateEngine.Authoring.Tasks

[2]: dotnet/dotnet@2f68b99...aec9216
MetadataLoadContext's `GetCustomAttributesData()` returns a fresh `ReadOnlyCollection<CustomAttributeData>` on every call. Since bgen queries multiple attribute types per provider (via `GetCustomAttributes<T>`, `HasAttribute<T>`, `HasAttribute(string)`, `IsNullable`), the same provider's raw attribute list was being allocated and discarded many times over.

Add a `Dictionary<ICustomAttributeProvider, IList<CustomAttributeData>>` that caches the raw result per provider. Changed `GetAttributes()` from static to instance to enable this cache. `HasAttribute(string)` also changed from static to instance (only one caller, already via instance).

```
Baseline average (3 runs): 24.7s, 9164 MB total, gen0=1660, gen1=513
After average (3 runs):    22.1s, 6990 MB total, gen0=1265, gen1=417
Time:   -2.6s (-10.5%)
Memory: -2174 MB (-23.7%)
GC:     gen0 -395 (-23.8%), gen1 -96 (-18.7%)
```

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rokvin@microsoft.com>
This will become important soon, because much of the code here will run from
inside an MSBuild task, and we mustn't call Console.[Error.]WriteLine from
inside an MSBuild task (it can cause tasks to deadlock). With these changes
it'll be much easier to remap Log calls to MSBuild's Task.LogMessage method.
Update the following package versions:
- NUnit: 4.4.0 → 4.6.1
- NUnit3TestAdapter: 6.1.0 → 6.2.0
- NUnitAnalyzers: 4.7.0 → 4.13.0
- NUnitXmlTestLogger: 3.1.15 → 8.0.0
- NUnitLite: 3.12.0 → 4.6.1
- NUnitV2ResultWriter: 3.6.0 → 3.8.0

Also remove the tools/nunit3-console* scripts, they're no longer needed.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes:
https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=14220252&view=logs&j=7052fe35-1431-500d-b066-a8f68f3e4472&t=3e86fd51-d381-52a3-1170-668b62fca50b&s=1d91d519-4060-54d4-b74e-0ef61a7f9d43

```
GEN      Microsoft.iOS.xml
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked For more information on this error code see https://www.sqlite.org/rescode.html'.
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
   at Microsoft.Data.Sqlite.SqliteConnection.BackupDatabase(SqliteConnection destination, String destinationName, String sourceName)
   at AppleDocReader.Database.MicrosoftDataSqlite.AdrMicrosoftDataSqliteConnection.BackupDatabase(AdrSqliteConnection destination, String destinationName, String sourceName, Int32 pages, Object ignored, Int32 retryMilliseconds) in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Database/AdrSqliteConnection.cs:line 160
   at AppleDocReader.Database.AdrDatabaseXcode14.ResolveChildren() in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Database/AdrDatabaseXcode14.cs:line 604
   at AppleDocReader.Database.AdrDatabaseXcode14.ResolveChildren() in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Database/AdrDatabaseXcode14.cs:line 604
   at AppleDocReader.Database.AdrDatabaseXcode14.ResolveChildren() in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Database/AdrDatabaseXcode14.cs:line 604
   at AppleDocReader.Database.AdrDatabaseXcode14.ResolveChildren() in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Database/AdrDatabaseXcode14.cs:line 604
   at AppleDocReader.Database.AdrDatabaseXcode14.ResolveChildren() in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Database/AdrDatabaseXcode14.cs:line 604
   at AppleDocReader.Database.AdrDatabaseXcode14.ResolveChildren() in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Database/AdrDatabaseXcode14.cs:line 604
   at AppleDocReader.Database.AdrDatabaseXcode14.ResolveChildren() in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Database/AdrDatabaseXcode14.cs:line 604
   at AppleDocReader.Database.AdrDatabaseXcode14.ResolveChildren() in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Database/AdrDatabaseXcode14.cs:line 604
   at AppleDocReader.Database.AdrDatabaseXcode14.ResolveChildren() in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Database/AdrDatabaseXcode14.cs:line 604
   at AppleDocReader.Database.AdrDatabaseXcode14.ResolveChildren() in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Database/AdrDatabaseXcode14.cs:line 604
   at AppleDocReader.Database.AdrDatabaseXcode14.ResolveChildren() in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Database/AdrDatabaseXcode14.cs:line 604
   at AppleDocReader.Database.AdrDatabaseXcode14.ResolveChildren() in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Database/AdrDatabaseXcode14.cs:line 604
   at AppleDocReader.Database.AdrDatabaseXcode14.Populate(Boolean populate) in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Database/AdrDatabaseXcode14.cs:line 201
   at AppleDocReader.Database.AdrDatabaseXcode14.CreateFromXcode(String xcodePath, ValueTuple`2 version, String dbPath, HashSet`1 jsonSelectors) in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Database/AdrDatabaseXcode14.cs:line 125
   at AppleDocReader.Database.AdrFactory.GetDatabase(String xcodePath, String dbPath, HashSet`1 jsonSelectors) in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Database/AdrFactory.cs:line 21
   at AppleDocReader.Commands.Inject.DocsCommand.InvokeInternal() in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Commands/Inject/DocsCommand.cs:line 36
   at AppleDocReader.Commands.AdrCommand.Invoke(IEnumerable`1 arguments) in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Commands/AdrCommand.cs:line 61
   at Mono.Options.CommandSet.Run(IEnumerable`1 arguments)
   at AppleDocReader.MainClass.Main2(String[] args) in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Main.cs:line 45
   at AppleDocReader.MainClass.Main(String[] args) in /Users/builder/azdo/_work/3/s/src/AppleDocReader/Main.cs:line 17
make[1]: *** [build/dotnet/macos/doc/Microsoft.macOS.xml] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [all-recurse] Error 1

```


AppleDocReader backs up a shared Xcode SQLite database while injecting
docs into the generated platform XML files. When make builds the iOS,
macOS, tvOS, and Mac Catalyst XML docs in parallel, multiple
AppleDocReader processes can race on that database and fail with SQLite
Error 5: database is locked.

Run AppleDocReader under a shared lockf lock so the rest of the build
can remain parallel while the database access is serialized.
Add a configure-time option for selecting the Xcode installation used by
the build.

Some build images install Xcode 26.5 as:

    /Applications/Xcode_26.5.app

while the repository default points at:

    /Applications/Xcode_26.5.0.app

Xcode does not behave well when accessed through symlinks, so make the
path explicit instead of requiring machines to provide an alternate app
bundle name.

The configure options accept either the Xcode app bundle path or the
developer root path:

    ./configure --xcode=/Applications/Xcode_26.5.app
    ./configure --xcode=/Applications/Xcode_26.5.app/Contents/Developer
    ./configure --xcode-root=/Applications/Xcode_26.5.app
./configure
--xcode-developer-root=/Applications/Xcode_26.5.app/Contents/Developer

Based on PR review feedback, `configure` now writes the selected path
directly to `configure.inc` as `XCODE_DEVELOPER_ROOT`. `Make.config`
includes `configure.inc` before resolving the Xcode block and uses `?=`
for the existing default path:

XCODE_DEVELOPER_ROOT?=/Applications/Xcode_26.5.0.app/Contents/Developer

This keeps the behavior simple and consistent with the other configure
options: an explicitly configured Xcode path wins, while the existing
`.0.app` path remains the default when no path is configured.

`system-dependencies.sh` now also checks `configure.inc` for
`XCODE_DEVELOPER_ROOT` before falling back to the `Make.config` default,
and direct invocations export `DEVELOPER_DIR` from the resolved Xcode
root so the script and Make agree on the selected Xcode.

No pipeline- or agent-specific logic is added. CI can opt into the
shorter app bundle name by running:

    ./configure --xcode=/Applications/Xcode_26.5.app

Local developers with `Xcode_26.5.0.app` can continue using the default
configuration unchanged.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…25615)

We're only executing on macOS, so long paths are fine.
#25577)

Code Radiator failed to create the `main -> xcode26.5` merge PR because
safe-outputs attempted signed commit replay, then refused unsigned
fallback when a submodule update was present. This change switches the
merge workflow to explicit unsigned push behavior for PR branch updates.

- **Root cause addressed**
- Configure safe-outputs PR write paths to avoid `pushSignedCommits`
replay for merge branches that can include unsupported commit shapes
(notably submodule bumps).

- **Workflow source updates (`code-radiator.md`)**
  - Set `signed-commits: false` under:
    - `safe-outputs.create-pull-request`
    - `safe-outputs.push-to-pull-request-branch`

- **Compiled workflow parity (`code-radiator.lock.yml`)**
  - Updated generated safe-outputs handler/config payloads to include:
    - `"signed_commits": false` for `create_pull_request`
    - `"signed_commits": false` for `push_to_pull_request_branch`

```yaml
safe-outputs:
  create-pull-request:
    max: 10
    signed-commits: false
  push-to-pull-request-branch:
    max: 10
    signed-commits: false
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rolfbjarne <249268+rolfbjarne@users.noreply.github.com>
)

---------

Co-authored-by: Rolf Bjarne Kvinge <rokvin@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…25603)

mono-api-info now reads NullableAttribute and NullableContextAttribute
metadata from assemblies and appends '?' to type names for nullable
reference types in the XML output (parameters, return types, properties,
fields, and events).

mono-api-html now:
- Strips nullability annotations when matching methods (so nullability-
  only changes don't cause false removed/added entries)
- Detects nullability-only changes and renders them under a separate
  '(nullability)' subsection header to indicate they are non-breaking
- Handles the '?' suffix in type name resolution (GetTypeName)

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…a3594d11b8d56bf7d3dbce919e0688715d5ec to b6ed8ef7f3251d0b67ac2428c06253d0ba328e97 (#25639)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The remaining static state is mostly caching of environment variables (which won't
change during a process' lifetime).

This is necessary, because soon we'll include some of this code in MSBuild tasks,
which shouldn't have static state.
…20260603055155830 to main (#25626)

LEGO: Pull request from lego/hb_5df43909-4a19-4f55-bc3f-9ea8fccf3c82_20260603055155830 to main with localized lcls
There are known issues (deadlocks) with CFNetworkHandler: #25634

CFNetworkHandler is obsolete, so we won't fix any such issues, so to avoid deadlocks, just avoid testing CFNetworkHandler.

Fixes #25634.
`MtouchNoSymbolStrip` doesn't do anything on macOS, so use `NoSymbolStrip` instead.
Code Radiator failed when large merge PRs exceeded the default 1024 KB safe-output patch limit, causing PR creation to fall back to an issue. This updates the workflow to allow substantially larger generated patches.

- **Workflow source**
  - Raise the top-level `safe-outputs.max-patch-size` in `code-radiator.md` from the default to `10240` KB.

- **Compiled workflow**
  - Update the generated safe-output config in `code-radiator.lock.yml` so both PR creation and PR branch updates use the new `10240` KB limit.

- **Result**
  - Large inter-branch merge patches can proceed through `create_pull_request` instead of being rejected by the safe-output size guard.

```yaml
safe-outputs:
  max-patch-files: 1000
  max-patch-size: 10240
```

---------

Co-authored-by: rolfbjarne <249268+rolfbjarne@users.noreply.github.com>
…workflow (#25602)

The CI Post-Mortem workflow was failing on its weekly schedule because it requires authenticated Azure DevOps access that isn't available in the scheduled runner environment. Disabling the schedule so the workflow can only be triggered manually (`workflow_dispatch`).

## Changes

- **`.github/workflows/ci-postmortem.md`** — removed the `schedule` trigger from the frontmatter `on:` block
- **`.github/workflows/ci-postmortem.lock.yml`** — recompiled from updated source

---------

Co-authored-by: rolfbjarne <249268+rolfbjarne@users.noreply.github.com>
…the Xcode location. (#25628)

These warnings are just noise for us at this point. Eventually we'll just stop using the deprecated locations.

---------

Co-authored-by: Rolf Bjarne Kvinge <rokvin@microsoft.com>
This is a macOS-only class.

But keep obsolete APIs throwing PlatformNotSupportedException until XAMCORE_5_0.

---------

Co-authored-by: Rolf Bjarne Kvinge <rokvin@microsoft.com>
…5614)

---------

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Protected files were modified in this pull request and require manual scrutiny before merge.

Please verify that each protected-file change is intentional, policy-compliant, and safe:

  • Protected files: global.json, .github/skills/update-expected-app-size/SKILL.md, .github/agents/agentic-workflows.agent.md, .github/aw/actions-lock.json, .github/dependabot.yml, .github/workflows/ci-postmortem.lock.yml, .github/workflows/code-radiator.lock.yml, .github/workflows/copilot-setup-steps.yml, .github/workflows/macios-reviewer.lock.yml, .github/workflows/autoformat-v2.yml, .github/workflows/autoformat.yml, .github/workflows/autoformat2.yml, .github/copilot-instructions.md, .github/workflows/code-radiator.md, .github/workflows/inter-branch-merge-flow.yml, .github/workflows/update-single-platform-branches.yml, .github/workflows/yamllint.yml, .github/workflows/zizmor.yml, .github/workflows/maestro-changelog.yml, .github/workflows/ci-postmortem.md

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

⏭️ Skipping merge update: this PR is a draft. Convert to ready when you want automated updates to resume.

Generated by Code Radiator · sonnet45 595.2K ·

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.

5 participants