Repository navigation
[xcode27.0] Merge main into xcode27.0 - #26502
Conversation
Bumps [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action) from 0.6.0 to 0.6.1.
…in .NET 11+. (#26409) The trimmable-static registrar has been the default for NativeAOT on .NET 11+ since #26346. This makes it the default for **CoreCLR** as well, and enables the `PrepareAssemblies` flow along with it. Mono keeps the managed-static registrar — only CoreCLR and NativeAOT were measured and tested. ## Why `PrepareAssemblies` has to come along `PrepareAssemblies=true` is *required* for the trimmable-static registrar to produce a small app. The assembly-preparer writes the generated type map assemblies to disk (marked with `[AssemblyMetadata ("IsTrimmable", "True")]`) *before* the trimmer runs, so the trimmer treats them as ordinary trimmable input assemblies. Without it, the type map assemblies are created from inside the trimmer, where they end up with the `copy` assembly action — which means they're never trimmed, and since they reference every Objective-C type in the app, nothing else can be trimmed either. That's what made trimmable-static apps ~3x larger on CoreCLR, and it's why the old comment claimed the trimmable-static registrar couldn't be used outside of NativeAOT. That comment was simply wrong, and has been rewritten. ## Notes - The `$(UseMonoRuntime)` defaults had to be **moved above** the registrar defaults, because the latter now check `$(UseMonoRuntime)` at evaluation time and would otherwise read an empty value. This also matches the layout on `net11.0`, which reduces the merge conflict when this flows. - The `$(Registrar)` check on `PrepareAssemblies`/`PostProcessAssemblies` means a CoreCLR app that explicitly opts back in to the managed-static registrar doesn't get `PrepareAssemblies` enabled — that combination makes apps *larger*. NativeAOT keeps getting `PrepareAssemblies` regardless of the registrar (pre-existing behavior). - **This is inert on `main`**, since `main` is still .NET 10. It takes effect when it flows into `net11.0`. 🤖 Pull request created by Copilot --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Improve XML documentation for: - `VSAccountProviderAuthenticationSchemeExtensions` - `EKCalendarChooserSelectionStyle` - `EKCalendarChooserDisplayStyle` - `EKEventViewAction` - `EKEventEditViewAction` - `CMMagneticFieldCalibrationAccuracy` - `SSReadingListError` - `CTErrorDomain` - `CTCellularDataRestrictedState` - `CTCellularPlanProvisioningAddPlanResult` Each type is documented in a separate commit. The Cecil documentation baseline is updated for the newly documented `CTCellularPlanProvisioningAddPlanResult` API. 🤖 Pull request created by Copilot --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… switch. Fixes #26104. (#26140) Replace the hand-written IL rewrite of `[NS|UI]Application.EnsureUIThread` with an `ObjCRuntime.Runtime.CheckForIllegalCrossThreadCalls` trimmer feature switch, driven by a new `$(CheckForIllegalCrossThreadCalls)` MSBuild property (defaults to the build configuration: on for debug, off for release). * Remove `ProcessEnsureUIThread` (and its case) from the linker's `OptimizeGeneratedCode` step, and mark the now-orphaned `--optimize=remove-uithread-checks` flag as removed (following the existing `inline-intptr-size` convention). * Emit the `ObjCRuntime.Runtime.CheckForIllegalCrossThreadCalls` `RuntimeHostConfigurationOption` from `Xamarin.Shared.Sdk.targets` and stub the `EnsureUIThread` method body via ILLink substitutions on all four platforms when the feature is off. * Make `[NS|UI]Application.CheckForIllegalCrossThreadCalls` trimmable when the checks are off, without an API break: drop the field's `= true` initializer and instead set it from the application startup path, guarded by an internal feature-switched `Runtime.CheckForIllegalCrossThreadCalls` getter. When the feature is off the getter substitutes to a constant `false`, so the assignment is dead-code-eliminated and — with `EnsureUIThread` also stubbed — the field can be trimmed away entirely. * Document the new `$(CheckForIllegalCrossThreadCalls)` property and update `optimizations.md`. Because the property is emitted as a runtime feature switch, it also takes effect when trimming is disabled (the field reflects the property value at runtime); trimming is only needed to physically remove the check code. Add `EnsureUIThreadChecksTest` (with a dedicated `EnsureUIThreadApp` project that keeps `EnsureUIThread` reachable) verifying the feature switch value and that, in the app bundle, `EnsureUIThread` is stubbed and the field is trimmed when the checks are off (iOS + macOS). Fixes #26104 🤖 Pull request created by Copilot --------- Co-authored-by: Copilot App <223556219+Copilot@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>
…25861) (#26259) Scenario: An object whose native `init` returns a different pointer than `alloc` (e.g. `CKRecordZoneID`) frees its alloc'd address. If another object (e.g. a `__MonoMac_NSAsyncActionDispatcher`) is allocated at that just-freed address on another thread and registered in `object_map`, the first object's `Handle` setter would then unconditionally `UnregisterNSObject` its stale alloc handle and clobber the second object's registration. A later native->managed marshal of that address then fails ("Could not find an existing managed instance", errors 8027/8034/8035). Fix: * Defer `object_map` registration until after `init` for user types. User types carry their gchandle in a native ivar (set at alloc time), which is self-cleaning when the address is freed/reused, so it's a safe authoritative fallback lookup during `init`. Only the final (post-`init`) handle is added to `object_map`. Direct bindings have no ivar, so they stay eagerly registered and are protected by the ownership-aware unregister below. * Use an ownership-aware `UnregisterNSObject (handle, this)` in the `Handle` setter, which only removes the `object_map` entry if it still refers to `this` (mirroring the check `NativeObjectHasDied` already had). * Add a native->managed ivar fallback to `Runtime.GetNSObject`/`GetNSObject<T>` so a user type whose object_map registration was deferred can still be resolved during `init`. * Gate both behaviors behind a legacy `AppContext` switch (`ObjCRuntime.Runtime.RegisterObjectsBeforeInit`, default off) to restore the previous behavior if any existing binding relied on it. Tests: * AllocInitRaceTest deterministically reproduces the clobber with a tiny custom native allocator (ReuseSlotClassA/ReuseSlotClassB): one class' `init` frees its instance and forces the next allocation to reuse that exact address. ReusedAddressSurvivesAllocInitClobber verifies the reused address still resolves to the correct object; ReusedAddressClobberedWithLegacySwitch documents the pre-fix behavior with the legacy switch on. * InitCallbackProbeTest exercises surfacing `self` to managed code during `init`. * A failed-init + GC guard (InitReturnsNilClass) covers the #23679 shape (a native `init` that raises an Objective-C exception, followed by a forced GC). Fixes #9478. Fixes #23679. Fixes #25861. 🤖 Pull request created by Copilot --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Rolf Bjarne Kvinge <rokvin@microsoft.com>
Improve XML documentation for: - `PdfActionNamedName` - `PdfWidgetControlType` - `PdfLineStyle` - `PdfMarkupType` - `PdfTextAnnotationIconType` - `PdfBorderStyle` - `PdfDisplayBox` - `PdfDisplayMode` - `PdfAreaOfInterest` - `MKMapType` Each type is documented in a separate commit. The Cecil documentation baseline is updated for the newly documented `PdfMarkupType.Redact` and `PdfAreaOfInterest.AnyArea` APIs. 🤖 Pull request created by Copilot
) ErrorHelper.ShowInternal always logged through IToolLog.LogError, even for warnings. That was mostly harmless when the log was the console (the message text itself says "warning MTxxxx: ..."), but when the log is an MSBuild task - which is the case for the assembly preparer (the PrepareAssemblies task, used for NativeAOT) - every warning became an MSBuild error and failed the build. This made it impossible to build monotouch-test for macOS with NativeAOT, because the (correct) MT2387 warning about not being able to remove the dynamic registrar failed the build: error : warning MT2387: It's not safe to remove the dynamic registrar, because monotouchtest references 'ObjCRuntime.Runtime.RegisterAssembly (System.Reflection.Assembly)'. Use IToolLog.LogWarning for warnings instead, which each IToolLog implementation already handles correctly. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nion assembly for Hot Reload (#26410) The trimmable static registrar can relocate its registrar trampolines into a per-assembly companion assembly (`_<Asm>.TypeMap.dll`) so that user assemblies stay unmodified, which is a requirement for Hot Reload. Until now generic declaring types were excluded, because the existing implementation adds a proxy interface implementation to the user type - and that modifies the user assembly. This PR lifts that restriction. ## How it works For a method declared in a generic type we now emit a *generic* helper method into the companion assembly, mirroring the user type's generic parameters (including their constraints). Its body performs the same type-parameter-aware conversions as the regular trampoline, with the user type's generic parameters remapped to the helper method's own generic parameters. The static `UnmanagedCallersOnly` callback - which doesn't know the instance's generic arguments - boxes the native arguments into an `object []` and calls the new `Runtime.InvokeGenericRegistrarTrampoline`, which closes the helper over the instance's actual generic arguments (`MakeGenericMethod`) and invokes it. This path is only ever reachable in a Hot-Reload-compatible build, which always runs under the JIT, so `MakeGenericMethod` is safe; it's guarded with `Runtime.IsNativeAOT` so the linker folds it away (and elides the IL2060/IL3050 warnings) everywhere else. The closed helper is cached per (open helper method, closed instance type) in a nested type, so the reflection cost is paid once per instantiation, and so the `ConcurrentDictionary` instantiation is trimmed away together with the trampoline in every other configuration. ## Notable details | Detail | Why | |-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `out`/`ref` parameters | Pointer-typed native parameters can't be boxed into an `object []`, so they're represented as a plain `IntPtr` in the helper (same size, same native ABI). | | `exception_gchandle` | Reflection can't marshal an `IntPtr*`, so the helper takes an `out IntPtr` and the callback writes it back through the native pointer. | | Value-type returns | The helper returns `null` on failure, so the callback returns `default (T)` instead of unboxing `null` (which would throw across the `UnmanagedCallersOnly` boundary). | | `[DynamicDependency]` | The trimmer crashes when comparing a signature's parameter list against a method with a nested type parameter, so signatures now omit the parameter list when unambiguous. | The `[DynamicDependency]` change works around dotnet/runtime#131892. ## Tests * New assembly-preparer tests covering the relocated generic trampolines. * A new `Debug (trimmable static registrar, all optimizations)` test variation. This also fixes the existing `Release (trimmable static registrar, all optimizations)` variation, which was actually running a Debug build. 🤖 Pull request created by Copilot --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ixes #26288 (#26406) Simulator runtime downloads via `xcodebuild -downloadPlatform` in `system-dependencies.sh` occasionally fail with transient network errors during "Provision system dependencies", before any tests run. When the requested runtime isn't available through the normal mechanism, `xcodebuild` falls back to downloading it from Apple's downloadable simulator index, and that transport sometimes stalls until curl fails (e.g. `curl: (56) Recv failure: Operation timed out`). In that fallback case `xcodebuild` frequently still exits 0 while only printing the failure to stdout, so its exit code can't be trusted. This adds an `xcodebuild_download_platform` helper that retries the download up to 5 times (with a 15s delay between attempts). Rather than trusting `xcodebuild`'s exit code or parsing its output, it determines whether a download attempt succeeded by checking the desired result directly: is the simulator runtime actually installed and available afterwards (via `xcrun simctl list runtimes`)? This is the same kind of check already used in `check_old_simulators`. The helper is used for all three `-downloadPlatform` call sites. Fixes #26288 🤖 Pull request created by Copilot --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
We've had a few regressions in mono-api-html, so this fixes the latest one and adds a unit test project to guard against future ones.
## The bug
The `MultiplexedFormatter` builds descriptions using the placeholder tokens `%LESSERTHANREPLACEMENT%` / `%GREATERTHANREPLACEMENT%`, because a single shared description string must be converted into each sub-formatter's own representation (`<`/`>` for HTML, `<`/`>` for markdown). The structured methods already convert these via `Replace ()`, but the raw `Write`/`WriteLine` string overloads did not.
The "New Type" addition path (`ClassComparer.AddedInner`) writes generic interface lists such as `IEnumerable<AuthorizationRight>` directly through `Output.Write`, so the placeholders leaked verbatim into the generated HTML (and markdown), e.g.:
IEnumerable%LESSERTHANREPLACEMENT%AuthorizationRight%GREATERTHANREPLACEMENT%
Applying `Replace ()` in the six string-based `Write`/`WriteLine` overloads converts the placeholders per sub-formatter on this path too.
## Tests & solution
* Added `tools/api-tools/mono-api-html-tests`, an NUnit test project that references `mono-api-html`. The first test drives the public `ApiDiffFormatted.Generate` over in-memory api-info XML (the exact `AuthorizationRights` case), producing both HTML and markdown, and asserts no `*THANREPLACEMENT` tokens leak and that the generic interface renders correctly in both formats. Verified the test fails without the fix.
* Added `tools/api-tools/api-tools.slnx` referencing `mono-api-info`, `mono-api-html` and the new test project, so `dotnet test` in `tools/api-tools` builds all three and runs the tests.
🤖 Pull request created by Copilot
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…gnatures. (#26418) The static registrar could emit method signatures referencing an Objective-C type whose framework header wasn't imported in the generated code, which made the generated code fail to compile: registrar.h:266:27: error: expected a type 266 | -(void) registerWebView:(WKWebView *)p0; | ^ This happened for a wrapper type from a binding project (Google.MobileAds' GADMobileAds) with a method taking a WebKit.WKWebView parameter, where nothing else in the app pulled in the WebKit framework: 'CheckNamespace' is only called for the types the registrar iterates over, not for the types showing up in the generated method signatures. Fix this by calling 'CheckNamespace' in 'ToObjCParameterType' for platform NSObject types, so that the corresponding '#import <Framework/Framework.h>' is always emitted. Copilot-Session: ddb2f938-9d62-4ccf-8ce8-70056d74178b --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Improve XML documentation for: - `AVAudioSessionSetActiveOptions` - `AVMusicTrackLoopCount` - `AVAudioSessionActivationOptions` - `SCNErrorCode` - `NSFileVersionReplacingOptions` - `NSFileVersionAddingOptions` - `NSItemProviderFileOptions` - `CVOptionFlags` - `CVTimeFlags` - `CVPixelBufferPoolFlushFlags` Each type is documented in a separate commit. The Cecil documentation baseline is updated for the newly documented `AVAudioSessionActivationOptions`, `SCNErrorCode`, and `NSItemProviderFileOptions` APIs. 🤖 Pull request created by Copilot --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Improve XML documentation for: - `NSPasteboardWritingOptions` - `NSFontCollectionOptions` - `NSApplicationOcclusionState` - `NSWindowOcclusionState` - `NSWindowListOptions` - `NSPasteboardContentsOptions` - `NSFontAssetRequestOptions` - `VTCompressionSessionOptionFlags` - `AudioObjectPropertyElement` - `AUEventSampleTime` Each type is documented in a separate commit. The Cecil documentation baseline is updated for the newly documented AppKit and AudioUnit types. 🤖 Pull request created by Copilot --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…on to choose Xcode. (#26420) Trying to clarify that it's not necessary to set these variables, we'll use the system's default Xcode if neither are specified.
…16744 (#26245) Generate the trusted platform assembly list from final publish items for non-debug builds, avoiding app bundle enumeration during startup. Retain runtime discovery for debug builds to minimize build overhead, optimize single-RID path expansion, and preserve universal bundle handling on supported platforms. Fixes #16744 🤖 Pull request created by Copilot --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bumps [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action) from 0.6.1 to 0.6.2.
…20260818173756944 to main (#26450) LEGO: Pull request from lego/hb_5df43909-4a19-4f55-bc3f-9ea8fccf3c82_20260818173756944 to main with localized lcls
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**: [20260824.4](https://dev.azure.com/dnceng/internal/_build/results?buildId=3055873) ([328327](https://maestro.dot.net/channel/2/github:dotnet:xharness/build/328327)) - **Date Produced**: August 24, 2026 12:52:33 PM UTC - **Commit**: [8175b669ea7188fce75ed33abedae717cb20af4b](dotnet/xharness@8175b66) - **Branch**: [main](https://github.com/dotnet/xharness/tree/main) - **Dependency Updates**: - From [11.0.0-prerelease.26370.1 to 11.0.0-prerelease.26424.4][6] - Microsoft.DotNet.XHarness.iOS.Shared [6]: dotnet/xharness@65e5795...8175b66
…20260818053657337 to main (#26448) LEGO: Pull request from lego/hb_5df43909-4a19-4f55-bc3f-9ea8fccf3c82_20260818053657337 to main with localized lcls
…20260819053807749 to main (#26451) LEGO: Pull request from lego/hb_5df43909-4a19-4f55-bc3f-9ea8fccf3c82_20260819053807749 to main with localized lcls
…Fixes #26330 (#26332) We bake the runtime configuration directly into the app and hand it to the runtime, bypassing `hostfxr`. `hostfxr` is what would normally merge the companion `*.runtimeconfig.dev.json` file into the main runtime configuration, so the Debug-only switches the .NET SDK writes there (such as Hot Reload's `System.StartupHookProvider.IsSupported` and `System.Reflection.Metadata.MetadataUpdater.IsSupported`) never reached the runtime. ## Fix Rather than teach the shared `RuntimeConfigParserTask` (from dotnet/runtime) about the dev file, this does the merge locally and keeps using that task unchanged: - New `MergeRuntimeConfigFiles` MSBuild task overlays the dev file's `runtimeOptions.configProperties` on top of the main file's (dev wins, matching `hostfxr`) and writes a merged json. If there is no dev file, or it has no `configProperties`, the main file is written out unchanged so the target's incremental Inputs/Outputs logic stays consistent. - `_CreateRuntimeConfiguration` now runs the merge into `runtimeconfig.merged.json` in the device-specific intermediate dir, feeds that to `RuntimeConfigParserTask`, adds the dev file to the target `Inputs`, and adds the merged file to `FileWrites`. - Added a unit test covering the merge (dev wins, main-only preserved, dev-only added), the no-dev-file case, and a dev file without `configProperties`. This mirrors the equivalent fix in dotnet/android#12249. Fixes #26330 🤖 Pull request created by Copilot --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replace the external dotnet-tools clone in the Maestro changelog workflow with a vendored scripts/changelog project. The workflow now checks out the repository and runs the local tool instead of cloning spouliot/dotnet-tools. 🤖 Pull request created by Copilot --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ated method bodies. (#26471) The trimmable static registrar (and the Dlfcn inlining step) generate method bodies using the long form of the ldloc/stloc/ldarg/ldloca instructions. This trips a bug in the CoreCLR interpreter, where the store/load peephole optimization reads the operand of the long form of ldloc/stloc at the wrong offset (ip + 1 instead of ip + 2). The resulting bogus local index is used to index an array, which leads to an out-of-bounds read and a SIGBUS at runtime: make clean build run-bare -C tests/monotouch-test/dotnet/MacCatalyst TEST_VARIATION=trimmable-static-registrar crashed in MonoTouchFixtures.ObjCRuntime.RegistrarTest.TestConstrainedGenericType. The interpreter bug has been fixed in dotnet/runtime#131547, but we still need to work around it until we get a runtime with that fix. Emitting the macro/short form of the instructions avoids the problematic instruction sequence entirely, and it also makes the generated IL smaller, which is a good thing in itself. For monotouch-test on macOS, this removes all 3709 adjacent long-form 'stloc; ldloc' pairs from the generated `_monotouchtest.TypeMap.dll`. Copilot-Session: a002000e-438e-48ff-9c22-c716d1a2e7aa --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… in trimmed assemblies. (#26486) `PreserveSmartEnumConversionsStep` has two ways of preserving the smart enum conversion methods: * Inject a `[DynamicDependency]` attribute on the method that references the smart enum. This is conditional: the conversion methods only survive if the referencing method survives. * Emit an ILLink root descriptor file. This preserves the conversion methods unconditionally, and is required when we can't modify the assembly (hot reload). Which one to use was decided by the global `HotReloadCompatibleBuild` option, which defaults to true for all debug builds. That meant that every smart enum referenced anywhere in the platform assembly was preserved unconditionally, which in turn kept a lot of code alive that should have been trimmed away (15+ extra namespaces surviving in the platform assembly, which made us link with the corresponding frameworks). Assemblies with `AssemblyAction.Link` are being trimmed, so they're not hot reloadable and can safely be modified - this is the same condition we already use in `RemoveUserResourcesSubStep`, `ListExportedSymbols` and `InlineDlfcnMethodsStep`. Verified by inspecting a Full-linked `Microsoft.iOS.dll`: the number of surviving namespaces went from 19 down to 6. 🤖 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/xharness - **Subscription**: [02e03784-16b3-4ced-b02a-3715797fc7da](https://maestro.dot.net/subscriptions?search=02e03784-16b3-4ced-b02a-3715797fc7da) - **Build**: [20260827.1](https://dev.azure.com/dnceng/internal/_build/results?buildId=3059552) ([329069](https://maestro.dot.net/channel/2/github:dotnet:xharness/build/329069)) - **Date Produced**: August 28, 2026 1:21:46 AM UTC - **Commit**: [31fee41307f51d5108eba7a4c60e469ce06d620f](dotnet/xharness@31fee41) - **Branch**: [main](https://github.com/dotnet/xharness/tree/main) - **Dependency Updates**: - From [11.0.0-prerelease.26424.4 to 11.0.0-prerelease.26427.1][3] - Microsoft.DotNet.XHarness.iOS.Shared [3]: dotnet/xharness@8175b66...31fee41 --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…lly. (#26485) The typemap assemblies we generate got a new random module version id (MVID) and a new timestamp every time they were written, which means they'd be different for every build even if nothing had changed. This is bad for incremental builds, because the MVID of every assembly in the app ends up in the generated native registrar code, so the registrar code would change on every build, forcing a recompile and a relink of the native executable. Fix this by asking Cecil to compute the MVID from the contents of the assembly (and to use a fixed timestamp), which means the MVID now only changes when the contents of the typemap assembly actually change. Verified by doing two clean builds of MySimpleApp (iOS/ios-arm64/CoreCLR) and comparing the MVIDs of every assembly in the app bundle as well as the generated registrar.mm: they're now identical (before this change the four typemap assemblies differed, and so did registrar.mm). 🤖 Pull request created by Copilot --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Treat Mac Catalyst as a desktop platform when deciding whether to package and run macOS tests. This prevents macOS test stages from being skipped when a branch enables only Mac Catalyst. 🤖 Pull request created by Copilot
Some asserts an output a lot of text, but we don't need all of that in the html report, so cap it.
There was a problem hiding this comment.
🟡 Changes recommended
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR merges main into the xcode27.0 branch, bringing in the latest runtime, linker/registrar, MSBuild, tooling, tests, documentation, and dependency updates needed for the Xcode 27.0 line.
Changes:
- Updates ObjC runtime object registration / handle lifecycle (issue #25861) and expands trimmable registrar relocation support (incl. Hot Reload + generic types).
- Improves linker/assembly-preparer behavior (deterministic typemap writes, optimized Cecil IL generation, new feature switches, runtimeconfig merging, build-time TPA generation).
- Refreshes tests/docs/tooling and bumps dependencies / workflow actions.
File summaries
| File | Description |
|---|---|
| tools/linker/OptimizeGeneratedCode.cs | Removes UIThread call optimization path |
| tools/dotnet-linker/Steps/TrimmableRegistrarStep.cs | Deterministic typemap assembly writes |
| tools/dotnet-linker/Steps/ManagedRegistrarStep.cs | Hot Reload relocation for generic trampolines |
| tools/dotnet-linker/Steps/ManagedRegistrarLookupTablesStep.cs | Switch to finalized IL bodies |
| tools/dotnet-linker/Steps/InlineDlfcnMethodsStep.cs | Finalize generated IL bodies |
| tools/dotnet-linker/Steps/GenerateMainStep.cs | Populate trusted platform assemblies list |
| tools/dotnet-linker/PreserveSmartEnumConversionsStep.cs | Hot Reload-aware preservation strategy |
| tools/dotnet-linker/LinkerConfiguration.cs | New config keys for TPA/multi-RID |
| tools/dotnet-linker/DocumentionComments.cs | Add “name-only” signature helper |
| tools/dotnet-linker/CecilExtensions.cs | Optimize macros + finalize IL offsets |
| tools/dotnet-linker/AppBundleRewriter.cs | New runtime hook + safer DDA signatures |
| tools/devops/automation/scripts/bash/configure-decisions.sh | Run mac tests for Mac Catalyst too |
| tools/common/Target.cs | Emit build-time TPA list into generated main |
| tools/common/StaticRegistrar.cs | Enforce namespace checks for protocol handling |
| tools/common/Optimizations.cs | Deprecate remove-uithread-checks optimization |
| tools/common/ErrorHelper.tools.cs | Log warnings as warnings (MSBuild-safe) |
| tools/common/Application.cs | Add TPA + multi-RID fields |
| tools/api-tools/mono-api-info/mono-api-info.csproj | Use shared Mono.Cecil package version |
| tools/api-tools/mono-api-html/MultiplexedFormatter.cs | Fix placeholder replacement when multiplexing |
| tools/api-tools/mono-api-html-tests/mono-api-html-tests.csproj | New NUnit test project |
| tools/api-tools/mono-api-html-tests/ApiDiffTests.cs | Regression test for placeholder leakage |
| tools/api-tools/api-tools.slnx | Add solution definition for api-tools |
| tests/xharness/TestReporterFactory.cs | Adjust TestReporter creation signature |
| tests/xharness/TestReporter.cs | Expose protocol connection state |
| tests/xharness/Jenkins/TestVariationsFactory.cs | Add missing trimmable-static debug/release variants |
| tests/xharness/Jenkins/TestTasks/MacExecuteTask.cs | Pass AppBundleInformation into crash capture/reporting |
| tests/xharness/Jenkins/Reports/HtmlReportWriter.cs | Cap failure message length in HTML report |
| tests/xharness/CrashSnapshotReporterFactory.cs | Require AppBundleInformation for reporter creation |
| tests/xharness/AppRunner.cs | Pass app info to crash reporter; remove exception logger |
| tests/test-libraries/libtest.m | Add native helpers for alloc/init race scenarios |
| tests/test-libraries/libtest.h | Declare new native callbacks/classes for tests |
| tests/rgen/Microsoft.Macios.Transformer.Tests/Microsoft.Macios.Transformer.Tests.csproj | Use shared Mono.Cecil package version |
| tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/MergeRuntimeConfigFilesTaskTest.cs | New MSBuild task tests |
| tests/monotouch-test/ObjCRuntime/InitCallbackProbeTest.cs | Probe tests for init-time callbacks |
| tests/monotouch-test/ObjCRuntime/AllocInitRaceTest.cs | Deterministic regression for handle reuse race |
| tests/linker/link all/PreserveTest.cs | Update expected Runtime.RegisterNSObject signature |
| tests/dotnet/UnitTests/Extensions.cs | Update expected deprecation warning strings |
| tests/dotnet/UnitTests/EnsureUIThreadChecksTest.cs | New tests for UI thread check feature switch |
| tests/dotnet/EnsureUIThreadApp/tvOS/EnsureUIThreadApp.csproj | New tvOS test app project |
| tests/dotnet/EnsureUIThreadApp/shared.csproj | Shared props for EnsureUIThread test app |
| tests/dotnet/EnsureUIThreadApp/macOS/EnsureUIThreadApp.csproj | New macOS test app project |
| tests/dotnet/EnsureUIThreadApp/MacCatalyst/EnsureUIThreadApp.csproj | New Mac Catalyst test app project |
| tests/dotnet/EnsureUIThreadApp/iOS/EnsureUIThreadApp.csproj | New iOS test app project |
| tests/dotnet/EnsureUIThreadApp/EnsureUIThreadApp.cs | Add EnsureUIThread reference for inspection |
| tests/dotnet/EnsureUIThreadApp/Directory.Build.props | Wire test app to shared props |
| tests/cecil-tests/Documentation.KnownFailures.txt | Update known-failures baseline |
| tests/bindings-test/ApiDefinition.cs | Add bindings for new native test helpers |
| tests/assembly-preparer/RelocateRegistrarTrampolinesTests.cs | Add Hot Reload generic relocation coverage |
| tests/assembly-preparer/PreserveSmartEnumConversionsTest.cs | Update assertions for new DDA signature logic |
| tests/assembly-preparer/PreserveBlockCodeHandlerTests.cs | Update expectations for name-only DDA signatures |
| tests/assembly-preparer/OptimizeGeneratedCodeHandlerTests.cs | Remove UIThread tests; refine optimizer coverage |
| tests/assembly-preparer/BaseClass.cs | Extend helper to allow extra csproj content |
| system-dependencies.sh | Improve tvOS runtime download verification |
| src/VideoToolbox/VTDefs.cs | Improve enum docs |
| src/VideoSubscriberAccount/VSAccountProviderAuthenticationScheme.cs | Improve XML docs for smart-enum conversions |
| src/UIKit/UIApplication.cs | Tie UI thread check field to Runtime feature switch |
| src/SceneKit/Defs.cs | Improve enum docs |
| src/SafariServices/SSEnums.cs | Improve enum docs |
| src/rgen/Microsoft.Macios.Transformer/Microsoft.Macios.Transformer.csproj | Use shared Mono.Cecil package version |
| src/PdfKit/Enums.cs | Improve enum docs + new value docs |
| src/ObjCRuntime/Runtime.cs | Ownership-aware unregister + generic trampoline invoke |
| src/MapKit/MKEnums.cs | Doc fix/typo |
| src/ILLink.Substitutions.tvOS.xml | Add CheckForIllegalCrossThreadCalls substitutions |
| src/ILLink.Substitutions.macOS.xml | Add CheckForIllegalCrossThreadCalls substitutions |
| src/ILLink.Substitutions.MacCatalyst.xml | Add CheckForIllegalCrossThreadCalls substitutions |
| src/ILLink.Substitutions.iOS.xml | Add CheckForIllegalCrossThreadCalls substitutions |
| src/Foundation/NSObject2.cs | Deferred registration + ivar fallback (issue #25861) |
| src/Foundation/Enum.cs | Improve enum docs + add NSItemProviderFileOptions docs |
| src/EventKitUI/Defs.cs | Improve enum docs |
| src/CoreVideo/CVEnums.cs | Improve enum docs |
| src/CoreTelephony/CTEnums.cs | Improve enum docs + add Cancel value docs |
| src/CoreMotion/Defs.cs | Remove placeholder remarks |
| src/AVFoundation/Enums.cs | Improve enum docs + add activation options docs |
| src/AudioUnit/AUEnums.cs | Improve enum docs |
| src/AppKit/NSApplication.cs | Tie UI thread check field to Runtime feature switch |
| src/AppKit/Enums.cs | Improve enum docs + add missing summaries |
| scripts/changelog/README.md | New changelog script documentation |
| scripts/changelog/Program.cs | New changelog generator tool |
| scripts/changelog/fragment.mk | Add make integration for changelog script |
| scripts/changelog/changelog.csproj | New changelog tool project |
| runtime/xamarin/main.h | Add universal-build macro + TPA globals |
| runtime/runtime.m | Precomputed TPA support + universal-build path logic |
| NuGet.config | Remove obsolete darc public feed entry |
| msbuild/Xamarin.Shared/Xamarin.Shared.targets | Include .exe, fix incremental inputs |
| msbuild/Xamarin.MacDev.Tasks/Tasks/MergeRuntimeConfigFiles.cs | New task: merge runtimeconfig.dev into runtimeconfig |
| msbuild/Xamarin.MacDev.Tasks/Tasks/DetectSdkLocation.cs | Update warning wording |
| msbuild/Xamarin.Localization.MSBuild/MSBStrings.resx | Update warnings + add new task errors |
| macios/Localize/loc/zh-Hant/macios/tools/mtouch/Errors.resx.lcl | (Generated localization output changed) |
| macios/Localize/loc/tr/macios/msbuild/Xamarin.Localization.MSBuild/MSBStrings.resx.lcl | (Generated localization output changed) |
| macios/Localize/loc/ko/macios/msbuild/Xamarin.Localization.MSBuild/MSBStrings.resx.lcl | (Generated localization output changed) |
| macios/Localize/loc/ja/macios/msbuild/Xamarin.Localization.MSBuild/MSBStrings.resx.lcl | (Generated localization output changed) |
| eng/Version.Details.xml | Bump xharness dependency |
| eng/Version.Details.props | Bump xharness package version |
| dotnet/targets/Xamarin.Shared.Sdk.targets | Add TPA + runtimeconfig merge + feature switch wiring |
| dotnet/targets/Xamarin.Shared.Sdk.props | Registrar/PrepareAssemblies defaults (CoreCLR/NativeAOT) |
| docs/website/optimizations.md | Document new UI-thread-check control mechanism |
| docs/building-apps/build-properties.md | Document CheckForIllegalCrossThreadCalls + TPA generation |
| Directory.Build.props | Bump System.Security.Cryptography.Xml package version |
| .github/workflows/zizmor.yml | Bump zizmor action |
| .github/workflows/maestro-changelog.yml | Switch to in-repo changelog tool + safer checkout |
Review details
- Files reviewed: 100/100 changed files
- Comments generated: 2
- Review effort level: Lite
| <Val><![CDATA[The native linker failed to execute: {0}. Please file a bug report at https://github.com/dotnet/macios/issues/new]D;]A; ]]></Val> | ||
| <Tgt Cat="Text" Stat="Loc" Orig="New"> | ||
| <Val><![CDATA[無法執行原生連結器: {0}。請前往 https://github.com/dotnet/macios/issues/new]D; 提交錯誤 (Bug) 報告]A; ]]></Val> | ||
| <Val><![CDATA[無法執行原生連結器: {0}。請前往 https://github.com/dotnet/macios/issues/new 提交錯誤 (Bug) 報告]D;]A; ]]></Val> | ||
| </Tgt> |
| var trusted_platform_assembly_names = app.TrustedPlatformAssemblies | ||
| .Distinct (StringComparer.Ordinal) | ||
| // Any .exe files must be at the end, due to https://github.com/dotnet/runtime/issues/62735 | ||
| .OrderBy (v => Path.GetExtension (v).Equals (".exe", StringComparison.OrdinalIgnoreCase)) | ||
| .ThenBy (v => v, StringComparer.Ordinal) | ||
| .ToArray (); | ||
| if (app.GenerateTrustedPlatformAssemblies && trusted_platform_assembly_names.Length > 0) { |
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cd1fd6e9-5bf0-492b-90ba-cef0e91b6466
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
🚀 [CI Build #fbadeb7] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 197 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
No description provided.