Skip to content

[net11.0] Merge main into net11.0. - #26292

Merged
rolfbjarne merged 33 commits into
net11.0from
dev/rolf/bump-main-in-net11.0-2026-07-24
Jul 28, 2026
Merged

[net11.0] Merge main into net11.0.#26292
rolfbjarne merged 33 commits into
net11.0from
dev/rolf/bump-main-in-net11.0-2026-07-24

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

No description provided.

rolfbjarne and others added 21 commits July 22, 2026 15:51
…d 7 more types (#26229)

Improve XML documentation for:
- `NSScreen` (AppKit)
- `NSTextField` (AppKit)
- `AudioUnitUtils` (AudioUnit)
- `AudioRendererWasFlushedAutomaticallyEventArgs` (AudioToolbox)
- `AVAudioFormat` (AVFoundation)
- `PeripheralScanningOptions` (CoreBluetooth)
- `ConnectAttribute` (Foundation)
- `NSDimension` (Foundation)
- `NSErrorException` (Foundation)
- `NSUuid` (Foundation)

Changes:
- Replace boilerplate 'To be added.' with meaningful descriptions
- Remove empty XML doc nodes
- Fix formatting and indentation

🤖 Pull request created by Copilot

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the unsupported Sonnet alias with Claude Sonnet 4.6 in the macios reviewer and code radiator workflows.

Regenerate the compiled workflow lock files with gh-aw v0.80.9.

🤖 Pull request created by Copilot

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The `SpecialFolder` test writes temporary files to verify expected folder access, but access to macOS privacy-protected folders depends on the host's TCC state.

Make the write-access expectation optional and skip that probe for protected folders on macOS and Mac Catalyst, while preserving path and existence assertions.

Fixes #26225

🤖 Pull request created by Copilot
…andleSafety (#26214)

The C# compiler often compiles this (safe) pattern:

    var obj = ...;
    DoSomethingWith (obj.GetHandle ());
    GC.KeepAlive (obj);

by emitting a `dup` for `obj` instead of storing it in a local: one copy feeds `GetHandle`, the other stays on the stack until `GC.KeepAlive` consumes it. The HandleSafety test traced the dup'd value back to the instruction that produced it and, when that was a method call, reported "the object was never stored anywhere" - a false positive, since the object is explicitly kept alive.

Teach the test to treat a handle fetch as safe when the same object is passed to `GC.KeepAlive` somewhere in the method. This resolves `CFProxy.get_ProxyType` and nine other entries that already had a `GC.KeepAlive` but were still flagged:

* AVFoundation.AVCaptureReactionType_Extensions.GetSystemImage
* CoreGraphics.CGColor.Create
* CoreText.CTFontDescriptor.Create
* CoreVideo.CVImageBuffer.GetCodePoint (x3)
* Security.SecKeyChain.Remove
* Security.SecKeyChain.Update
* UIKit.UIContentSizeCategoryExtensions.Compare

Copilot-Session: dd86cf03-297a-43e8-ae1f-3c0b22bb67c4

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…stead of modifying (hot) reloadable assemblies. Fixes #26073 (#26087)

`PreserveSmartEnumConversionsStep` was the only assembly-preparer step that modified user (hot reloadable) assemblies: when a `[BindAs]` smart enum's conversion methods (`GetConstant`/`GetValue`) live in a trimmed framework assembly, it injected `[DynamicDependency]` attributes into the referencing assembly. That breaks Hot Reload, which requires that user assemblies aren't modified.

## Fix

When the new `$(HotReloadCompatibleBuild)` property is enabled **and** the step runs in the assembly-preparer, it no longer modifies the assembly. Instead it collects the framework-side conversion methods and emits an ILLink root-descriptor XML that preserves them unconditionally, and wires that descriptor into the trimmer via `TrimmerRootDescriptor`. The existing attribute-injection behaviour is kept for all other cases (release builds and the trimmer pass), so there's no app-size impact on non-Hot-Reload builds.

`$(HotReloadCompatibleBuild)` defaults to the debug state (`$(_BundlerDebug)`); since `$(PrepareAssemblies)` is opt-in, the new XML path only activates in the actual Hot Reload scenario.

Because the dependency that introduces `$(HotReloadCompatibleBuild)` (#26072) isn't merged yet, this PR includes a minimal, self-contained implementation of that property flow.

## Refactor

The XML root-descriptor generation was duplicated between this step and the existing `ApplyPreserveAttributeStep`. Extracted it into a new, independently unit-testable `XmlDescriptor` class (`PreserveMethod`/`PreserveField`/`PreserveType*`/`CreateXml`/`Save`) and used it from both steps (net ~174 lines removed across the two steps). `XmlDescriptor.Save` only rewrites the file when its contents change, so an unchanged descriptor doesn't needlessly invalidate incremental builds.

## Tests

- `HotReloadCompatibleBuildTest` in `PreserveSmartEnumConversionsTest.cs`: asserts no `[DynamicDependency]` attributes are injected and that the emitted XML preserves the framework-side `GetConstant`/`GetValue` methods.
- `XmlDescriptorTest.cs`: 7 unit tests for the new class (unconditional/conditional methods, fields, `preserve=all`/`fields`, generic-method name fallback, save-only-when-changed).

Fixes #26073

🤖 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>
#26131)

This is a significant code unification between macOS and the other platforms. Xamarin.Mac supported being loaded into a separate app, which meant additional supporting code. macOS for .NET does not support being loaded into a separate app (just like the other platforms), which means all the additional supporting code can be deleted, and we can share much more code between platforms.

* Add Runtime.EnsureUIThread (), and call this method from [NS|UI]Application.EnsureUIThread. Also move supporting code to the Runtime class.
* Remove NSApplication.EnsureInitialized - this was necessary to ensure `xamarin_initialize` was called when Xamarin.Mac was hosted inside another application (such as Visual Studio for Mac). .NET for macOS no longer supports being hosted inside another application, so this code can be removed.
* Remove Runtime.RegisterAssemblies () - it's no longer needed because .NET for macOS doesn't support being hosted inside another app.
* Don't set MONO_CFG_DIR anymore - this is *old* code, and shouldn't be needed now. If anybody does, then they can set this variable themselves.
* Remove NSApplication.ResetHandle () - it's no longer needed because .NET for macOS doesn't support being hosted inside another app.
* Add NSApplication.Initialize () - this mirrors UIApplication.Initialize ()
* Remove NSApplication.InitDrawBridge () - this is not applicable for .NET for macOS (not fully removed until XAMCORE_5_0)
* Remove NSApplication.Init () - this is not needed anymore in .NET for macOS (not fully removed until XAMCORE_5_0)
* Make the various [NS|UI]Application.Main methods return 'int' in XAMCORE_5_0.
* Misc other dead code fixes.
* Misc xml documentation updates.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…, and 12 more types (#26241)

Improve XML documentation for:
- `PreserveAttribute` (Foundation)
- `CMSensorDataList` (CoreMotion)
- `CSSearchableIndex` (CoreSpotlight)
- `CLAuthorizationStatus` and `CLActivityType` (CoreLocation)
- `CTFontCollection` (CoreText)
- `GKGameModel` (GameplayKit)
- `HMHome` (HomeKit)
- `LAStatus` (LocalAuthentication)
- `MKLocalSearch` (MapKit)
- `CVPixelBufferAttributes` (CoreVideo)
- `NSSound` (AppKit)
- `NSSpeechSynthesizer` (AppKit)
- `NSSpellChecker` (AppKit)
- `AVCaptureDeviceInput` (AVFoundation)
- `AVCaptureMetadataOutput` (AVFoundation)

Changes:
- Replace boilerplate 'To be added.' with meaningful descriptions
- Remove empty XML doc nodes
- Fix tag ordering (summary before param)
- Fix indentation

🤖 Pull request created by Copilot

---------

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

## Summary

Adds producer-owned common application metadata to every Apple `@(ApplicationArtifact)` item.

- Extends `ReadAppManifest` with `CFBundleName` and `CFBundleShortVersionString`.
- Reads metadata from the final compiled app bundle `Info.plist`, so custom manifest values win.
- Preserves unresolved or localized plist references as written instead of selecting a locale.
- Stamps `.app`, `.ipa`, `.pkg`, and `.xcarchive` artifacts with `ApplicationId`, `ApplicationTitle`, `ApplicationName`, `ApplicationDisplayVersion`, and `ApplicationVersion` while retaining existing Apple metadata.
- Runs before downstream `GetApplicationArtifactsDependsOn` extensions, preserving their ability to override producer metadata.
- Documents the common metadata contract and adds task/post-build coverage across Apple platforms, output formats, generated/custom manifests, `GenerateApplicationManifest=false`, `GetApplicationArtifacts`, and `Publish`.

Follow-up to #25723. Coordinated with dotnet/maui#35973 and dotnet/android#12123.

---------

Co-authored-by: redth <jondick@gmail.com>
…sing Native AOT. Fixes #21553 (#26197)

macOS and Mac Catalyst desktop builds default `NoDSymUtil=true`, so dSYM files are only generated when archiving (`ArchiveOnBuild=true`). dSYM files weren't very useful when macOS apps were compiled with the JIT, but they are valuable with Native AOT.

This mirrors the existing `NoSymbolStrip` Native AOT exception: when Native AOT is enabled, the desktop `NoDSymUtil` default no longer forces `true`, so dSYM files are generated by default.

Also updated the `NoDSymUtil` documentation and added a regression test (`PostBuildTest.NativeAotGeneratesDSymsByDefault`) for macOS and Mac Catalyst.

Fixes #21553

🤖 Pull request created by Copilot

---------

Co-authored-by: Alex Soto <alex@soto.dev>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…lComponent. Fixes #26183. (#26189)

When you build/deploy an app over SSH, the login keychain is typically locked (there's no GUI login session to unlock it). In that state codesign can't access the signing identity's private key and fails with the cryptic Security-framework error `errSecInternalComponent`, with no hint about what's actually wrong.

This detects that specific error in the `Codesign` MSBuild task and emits an additional, actionable error telling the user the keychain is likely locked and how to unlock it:

> Codesign failed with 'errSecInternalComponent'. This usually means the keychain is locked, which is common when building over SSH. Unlock the keychain first, for example by running 'security unlock-keychain ~/Library/Keychains/login.keychain-db'.

The original codesign error is still shown as well, since `errSecInternalComponent` isn't *always* caused by a locked keychain.

Fixes #26183

🤖 Pull request created by Copilot

---------

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

Add a new `_CopyXCFrameworkDSyms` MSBuild target that copies pre-existing dSYMs from xcframeworks next to the app's dSYM, so that they're included in the archive when the app is archived.

The target uses Inputs/Outputs for incremental build support.

Also add an `ArchiveDir` MSBuild property to the Archive task, which allows specifying a custom archive directory instead of computing a unique path under `~/Library/Developer/Xcode/Archives`.

Also modify the test-libraries Makefile to run dsymutil on dynamic framework binaries and include the resulting dSYMs in xcframeworks.

Fixes #23076

🤖 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>
…Record, CABasicAnimation, CAKeyFrameAnimation (#26250)

Improve XML documentation for 5 types:

- **AVPlayerItem**: Document VideoApertureMode property
- **AVPlayerItemVideoOutput**: Document constructor with pixel buffer attributes  
- **CKRecord**: Document indexer property
- **CABasicAnimation**: Document GetFromAs/SetFrom/GetToAs/SetTo/GetByAs/SetBy methods, remove empty remarks/returns
- **CAKeyFrameAnimation**: Document CalculationMode property

Also fix XML doc tag ordering to follow convention (summary before param/typeparam).

🤖 Pull request created by Copilot

---------

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

Initialize the native trampoline table from generated startup code only when dynamic registration support is enabled, so the native linker can dead-strip it otherwise.

Verify the linked trampoline symbol follows DynamicRegistrationSupported.

Fixes #16668

🤖 Pull request created by Copilot

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ABRecord, etc.) (#26256)

Improve XML documentation for 19 types:

- **NSValue.FromCGAffineTransform**: Document param, returns
- **MessageComposeResult**: Remove empty remarks
- **MTLPipelineBufferDescriptorArray**: Remove empty remarks/returns
- **MKFeatureDisplayPriority**: Remove empty remarks
- **ARFaceGeometry**: Remove empty remarks/returns
- **ARPlaneGeometry**: Remove empty remarks/returns
- **CMCalibratedMagneticField**: Remove empty remarks/returns
- **CMMagneticField**: Remove empty remarks/returns
- **MKPolygon**: Remove empty remarks
- **MTLRenderPassDescriptor**: Remove empty remarks/returns
- **MDLAsset**: Remove empty remarks
- **PHAssetCreationRequest**: Remove empty remarks
- **SCNPhysicsTest**: Remove empty remarks
- **SCNRenderingOptions**: Remove empty remarks
- **SCNSceneLoadingOptions**: Remove empty remarks
- **UIFontFeature**: Remove empty remarks
- **VSAccountMetadataRequest**: Remove empty remarks
- **ABRecord**: Document FromHandle method with proper tag ordering

Also fix XML doc tag ordering to follow convention (summary before param).

🤖 Pull request created by Copilot

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…haringService, ARPointCloud, CAMediaTimingFunction, CFType, CGPattern, AVAssetDownloadTask, AVOutputSettingsAssistant, CFMachPortContext, GKComponentSystem, HMCharacteristic (#26266)

Improves XML documentation for 12 types:

- NSCollectionViewLayout
- NSPasteboard
- NSSharingService
- ARPointCloud
- CAMediaTimingFunction
- CFType
- CGPattern / CGPatternTiling
- AVAssetDownloadTask
- AVOutputSettingsAssistant
- CFMachPortContext
- GKComponentSystem
- HMCharacteristic

Changes:
- Replaces placeholder 'To be added.' docs with meaningful descriptions
- Removes empty `<remarks>` and `<returns>` nodes
- Fixes XML doc tag ordering (summary before param)

🤖 Pull request created by Copilot

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 29d756e8-fe8d-4503-80fd-bee574af6fa4
Copilot AI review requested due to automatic review settings July 24, 2026 06:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR merges main into the net11.0 branch, bringing over runtime/tooling changes (Hot Reload–compatible assembly preparation, linker preservation plumbing, dynamic registrar init), build system improvements (dSYM handling, application artifact metadata, archiving options), and a large set of test/doc updates aligned with those behavior changes.

Changes:

  • Add Hot Reload–compatible mode for preserving smart-enum conversions by emitting an ILLink root-descriptor XML instead of modifying user assemblies, and wire that descriptor into trimming.
  • Improve build outputs/metadata: populate common @(ApplicationArtifact) application metadata from the compiled Info.plist, add ArchiveDir, adjust default dSYM generation (NativeAOT), and copy xcframework-provided dSYMs into archives.
  • Refactor runtime initialization/thread checks (centralize UI-thread enforcement in ObjCRuntime.Runtime), plus extensive test expectation and API doc cleanups.

Reviewed changes

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

Show a summary per file
File Description
tools/dotnet-linker/PreserveSmartEnumConversionsStep.cs Emit root-descriptor XML for smart-enum conversion preservation in Hot Reload–compatible builds.
tools/dotnet-linker/ApplyPreserveAttributeStep.cs Switch XML descriptor generation to shared XmlDescriptor helper.
tools/dotnet-linker/XmlDescriptor.cs New reusable writer for ILLink root-descriptor XML (types/methods/fields).
tools/common/Target.cs Initialize dynamic registrar trampolines in generated native setup code when applicable.
tools/assembly-preparer/assembly-preparer.csproj Link in XmlDescriptor.cs for assembly-preparer build.
tests/xcframework-test/dotnet/shared.csproj Include TestRuntime.LinkAll.cs in xcframework test shared project.
tests/test-libraries/Makefile Generate dSYMs for test frameworks and pass -debug-symbols when creating xcframeworks.
tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/ReadAppManifestTaskTests.cs Add coverage for reading additional Info.plist metadata.
tests/monotouch-test/SearchKit/SearchKitTest.cs Use NUnit assertion instead of throwing on null index creation.
tests/monotouch-test/dotnet/shared.csproj Include TestRuntime.LinkAll.cs in monotouch dotnet shared project.
tests/monotouch-test/dotnet/macOS/monotouch-test.csproj Remove XAMMAC_TESTS constant definition from macOS dotnet project.
tests/linker/trimmode link/dotnet/shared.csproj Include TestRuntime.LinkAll.cs for linker trimmode link tests.
tests/linker/trimmode copy/dotnet/shared.csproj Include TestRuntime.LinkAll.cs for linker trimmode copy tests.
tests/linker/link sdk/LinkSdkRegressionTest.cs Make SpecialFolder test more tolerant of macOS TCC/privacy and cleanup failures.
tests/linker/link sdk/dotnet/shared.csproj Include TestRuntime.LinkAll.cs for link-sdk tests.
tests/linker/link all/PreserveTest.cs Update smart-enum expectations for Hot Reload–compatible builds (XML roots are unconditional).
tests/linker/link all/dotnet/shared.csproj Include TestRuntime.LinkAll.cs for link-all tests.
tests/linker/dont link/dotnet/shared.csproj Include TestRuntime.LinkAll.cs for dont-link tests.
tests/introspection/dotnet/shared.csproj Include TestRuntime.LinkAll.cs for introspection dotnet tests.
tests/interdependent-binding-projects/dotnet/shared.csproj Include TestRuntime.LinkAll.cs for interdependent binding tests.
tests/framework-test/dotnet/shared.csproj Include TestRuntime.LinkAll.cs for framework tests.
tests/EmbeddedResources/dotnet/shared.csproj Include TestRuntime.LinkAll.cs for EmbeddedResources tests.
tests/dotnet/UnitTests/PostBuildTest.cs Add tests for artifact metadata, xcframework dSYM archiving, and NativeAOT dSYM defaults.
tests/dotnet/UnitTests/Extensions.cs Filter updated deprecation warning string for MD_APPLE_SDK_ROOT in .NET 11+.
tests/dotnet/UnitTests/expected/TVOS-NativeAOT-TrimmableStatic-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/TVOS-NativeAOT-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/TVOS-MonoVM-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/TVOS-MonoVM-preservedapis.txt Update preserved API expectations after runtime method renames/refactors.
tests/dotnet/UnitTests/expected/TVOS-MonoVM-interpreter-preservedapis.txt Update preserved API expectations after runtime method renames/refactors.
tests/dotnet/UnitTests/expected/TVOS-CoreCLR-R2R-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/TVOS-CoreCLR-R2R-preservedapis.txt Update preserved API expectations after runtime method renames/refactors.
tests/dotnet/UnitTests/expected/TVOS-CoreCLR-Interpreter-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/TVOS-CoreCLR-Interpreter-preservedapis.txt Update preserved API expectations after runtime method renames/refactors.
tests/dotnet/UnitTests/expected/MacOSX-NativeAOT-TrimmableStatic-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/MacOSX-NativeAOT-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/MacOSX-CoreCLR-R2R-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/MacCatalyst-NativeAOT-TrimmableStatic-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/MacCatalyst-NativeAOT-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/MacCatalyst-MonoVM-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/MacCatalyst-MonoVM-preservedapis.txt Update preserved API expectations after runtime method renames/refactors.
tests/dotnet/UnitTests/expected/MacCatalyst-MonoVM-interpreter-preservedapis.txt Update preserved API expectations after runtime method renames/refactors.
tests/dotnet/UnitTests/expected/MacCatalyst-CoreCLR-R2R-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/MacCatalyst-CoreCLR-R2R-preservedapis.txt Update preserved API expectations after runtime method renames/refactors.
tests/dotnet/UnitTests/expected/MacCatalyst-CoreCLR-Interpreter-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/MacCatalyst-CoreCLR-Interpreter-preservedapis.txt Update preserved API expectations after runtime method renames/refactors.
tests/dotnet/UnitTests/expected/iOS-NativeAOT-TrimmableStatic-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/iOS-NativeAOT-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/iOS-MonoVM-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/iOS-MonoVM-preservedapis.txt Update preserved API expectations after runtime method renames/refactors.
tests/dotnet/UnitTests/expected/iOS-MonoVM-interpreter-preservedapis.txt Update preserved API expectations after runtime method renames/refactors.
tests/dotnet/UnitTests/expected/iOS-CoreCLR-R2R-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/iOS-CoreCLR-R2R-preservedapis.txt Update preserved API expectations after runtime method renames/refactors.
tests/dotnet/UnitTests/expected/iOS-CoreCLR-Interpreter-size.txt Update expected app size.
tests/dotnet/UnitTests/expected/iOS-CoreCLR-Interpreter-preservedapis.txt Update preserved API expectations after runtime method renames/refactors.
tests/dotnet/UnitTests/DynamicRegistrationSupportedTest.cs Ensure dynamic registrar trampoline presence/absence is observable by linking libxamarin statically.
tests/dotnet/UnitTests/BundleStructureTest.cs Adjust expected multi-RID assembly layout for Hot Reload–compatible builds.
tests/dotnet/MySimpleAppWithArtifactMetadata/shared.csproj Add optional custom Info.plist and gate metadata augmentation target.
tests/dotnet/MySimpleAppWithArtifactMetadata/InfoWithoutDisplayName.plist New manifest for metadata fallback tests.
tests/dotnet/MySimpleAppWithArtifactMetadata/Info.plist New manifest for custom metadata tests.
tests/common/TestRuntime.LinkAll.cs New lightweight partial for link mode detection in multiple test assemblies.
tests/common/TestRuntime.cs Move link-detection helpers into TestRuntime.LinkAll.cs.
tests/common/shared-dotnet.csproj Define HOTRELOAD_COMPATIBLE_BUILD based on computed SDK property (via target).
tests/common/ConfigurationNUnit.cs Remove XAMMAC_TESTS-based conditional compilation around runtime ID assertions.
tests/common/Configuration.cs Remove XAMMAC_TESTS-based conditional compilation around base library helpers.
tests/cecil-tests/HandleSafety.KnownFailures.cs Update known failures list (remove entries fixed by handle-safety changes).
tests/cecil-tests/HandleSafety.cs Treat GC.KeepAlive(obj) after handle fetch as a safe lifetime pattern.
tests/cecil-tests/ApiTest.KnownFailures.cs Update known failures list (remove NSApplication.Init() entry).
tests/BundledResources/ResourcesTest.cs Update resource-stripping expectations for Hot Reload–compatible builds and link-all detection.
tests/BundledResources/dotnet/shared.csproj Compile TestRuntime.LinkAll.cs into BundledResources test assembly.
tests/bindings-test/dotnet/shared.csproj Include TestRuntime.LinkAll.cs for bindings tests.
tests/assembly-preparer/PreserveSmartEnumConversionsTest.cs Add test validating Hot Reload mode emits root-descriptor XML (no user assembly mutation).
tests/assembly-preparer/BaseClass.cs Allow passing extra assembly-preparer config for targeted scenarios.
src/VideoSubscriberAccount/VSAccountMetadataRequest.cs Replace placeholder docs with real summary/value text.
src/UIKit/UIFontFeature.cs Replace placeholder docs with real summary/value text.
src/UIKit/UIApplication.cs Rename/init changes, unify UI-thread enforcement via Runtime, and adjust Main return type under XAMCORE_5_0.
src/SceneKit/SCNSceneLoadingOptions.cs Replace placeholder docs with real summary/value text.
src/SceneKit/SCNRenderingOptions.cs Replace placeholder docs with real summary/value text.
src/SceneKit/SCNPhysicsTest.cs Replace placeholder docs with real summary/value text.
src/Photos/PHAssetCreationRequest.cs Improve XML docs for SupportsAssetResourceTypes.
src/ObjCRuntime/Runtime.mac.cs Move macOS platform init to call NSApplication.InitializeApplication().
src/ObjCRuntime/Runtime.iOS.cs Call UIApplication.InitializeApplication() during platform initialization.
src/ObjCRuntime/Runtime.cs Centralize product/assembly naming, main-thread tracking, and UI-thread enforcement; update init calls.
src/ObjCRuntime/Class.cs Rename initialization method to InitializeClass.
src/ModelIO/MDLAsset.cs Improve indexer docs and parameter description.
src/Metal/MTLRenderPassDescriptor.cs Improve docs for sample position APIs.
src/Metal/MTLArrays.cs Improve docs for pipeline buffer descriptor indexer.
src/MessageUI/MessageUI.cs Add meaningful docs for MessageComposeResult values.
src/MapKit/MKPolygon.cs Remove placeholder return docs from factory methods.
src/MapKit/MKLocalSearch.cs Improve async API docs and cancellation behavior documentation.
src/MapKit/MKFeatureDisplayPriority.cs Remove placeholder remarks from priority constants.
src/LocalAuthentication/LAEnums.cs Add meaningful docs for enum values.
src/HomeKit/HMHome.cs Improve docs for GetServices.
src/HomeKit/HMCharacteristic.cs Remove placeholder docs; fix “writeable”→“writable”.
src/GameplayKit/GKGameModel.cs Remove placeholder remarks from docs.
src/GameplayKit/GKComponentSystem.cs Improve docs for component access and parameters.
src/Foundation/PreserveAttribute.cs Improve ctor docs.
src/Foundation/NSUuid.cs Add docs for GetBytes.
src/Foundation/NSObject2.cs Rename Initialize to InitializeObject.
src/Foundation/NSErrorException.cs Improve Message property docs.
src/Foundation/NSDimension.cs Improve docs and clarify throwing behavior for BaseUnit.
src/Foundation/ConnectAttribute.cs Improve docs and fix “Inteface”→“Interface”.
src/CoreVideo/CVPixelFormatDescription.cs Fix doc typo “customer”→“custom”.
src/CoreVideo/CVPixelBufferAttributes.cs Improve ctor docs and parameter descriptions.
src/CoreText/CTFontCollection.cs Improve docs and parameters; remove placeholder remarks.
src/CoreSpotlight/CSSearchableIndex.cs Improve ctor docs and parameter descriptions.
src/CoreMotion/CMSensorDataList.cs Remove placeholder docs from enumerator methods.
src/CoreMotion/CMMagnetometer.cs Remove placeholder remarks and improve docs.
src/CoreMotion/CMDeviceMotion.cs Remove placeholder remarks and improve docs.
src/CoreLocation/CLEnums.cs Add meaningful docs for authorization and activity values.
src/CoreGraphics/NSValue.cs Improve parameter/return docs for FromCGAffineTransform.
src/CoreGraphics/CGPattern.cs Improve tiling enum docs and remove placeholder remarks.
src/CoreFoundation/CFType.cs Improve docs for type ID/description/equality APIs.
src/CoreFoundation/CFMachPort.cs Remove placeholder docs for properties/methods.
src/CoreBluetooth/PeripheralScanningOptions.cs Improve docs for AllowDuplicatesKey.
src/CoreAnimation/CAMediaTimingFunction.cs Improve docs for GetControlPoint.
src/CoreAnimation/CAKeyFrameAnimation.cs Improve docs for CalculationMode.
src/CoreAnimation/CABasicAnimation.cs Improve docs for typed getters/setters and parameters.
src/CloudKit/CKRecord.cs Improve indexer docs and parameter description.
src/AVFoundation/AVPlayerItemVideoOutput.cs Improve ctor docs and parameter notes.
src/AVFoundation/AVPlayerItem.cs Improve docs for VideoApertureMode.
src/AVFoundation/AVOutputSettingsAssistant.cs Fix HEVC typo and remove placeholder docs.
src/AVFoundation/AVCaptureMetadataOutput.cs Improve docs for metadata type properties.
src/AVFoundation/AVCaptureDeviceInput.cs Improve factory method docs and nullability note.
src/AVFoundation/AVAudioFormat.cs Improve StreamDescription docs and remove placeholder remarks.
src/AVFoundation/AVAssetDownloadTask.cs Clarify unsupported properties always throw.
src/AVFoundation/AudioRendererWasFlushedAutomaticallyEventArgs.cs Improve docs for flush time.
src/AudioUnit/AudioUnitUtils.cs Improve docs for SampleFractionBits.
src/ARKit/ARPointCloud.cs Improve docs for points/identifiers arrays.
src/ARKit/ARPlaneGeometry.cs Remove placeholder return/remarks docs.
src/ARKit/ARFaceGeometry.cs Remove placeholder return docs.
src/AppKit/NSTextField.cs Improve docs for Cell.
src/AppKit/NSSpellChecker.cs Improve docs for Language.
src/AppKit/NSSpeechSynthesizer.cs Improve docs for Voice.
src/AppKit/NSSound.cs Improve docs for Name.
src/AppKit/NSSharingService.cs Improve docs for service lookup API.
src/AppKit/NSScreen.cs Improve docs for supported window depths.
src/AppKit/NSPasteboard.cs Improve docs for WriteObjects.
src/AppKit/NSCollectionViewLayout.cs Improve docs for decoration view registration.
src/AppKit/NSApplication.cs Remove/neutralize legacy Init/InitDrawingBridge, add InitializeApplication, unify thread checks via Runtime.
src/AddressBook/ABRecord.cs Improve docs for FromHandle.
runtime/xamarin/runtime.h Declare xamarin_initialize_dynamic_registrar.
runtime/runtime.m Split trampoline initialization into xamarin_initialize_dynamic_registrar and adjust xamarin_initialize.
msbuild/Xamarin.Shared/Xamarin.Shared.targets Add additional Info.plist outputs, copy xcframework dSYMs to archives, and add artifact metadata population.
msbuild/Xamarin.Shared/Xamarin.Shared.props Generate dSYMs by default for desktop NativeAOT builds.
msbuild/Xamarin.MacDev.Tasks/Tasks/ReadAppManifest.cs Output additional Info.plist fields (bundle name and versions).
msbuild/Xamarin.MacDev.Tasks/Tasks/Codesign.cs Add a one-time hint when codesign fails with errSecInternalComponent.
msbuild/Xamarin.MacDev.Tasks/Tasks/Archive.cs Support user-provided ArchiveDir and avoid deleting it on failure.
msbuild/Xamarin.Localization.MSBuild/MSBStrings.resx Add localized message for codesign keychain-locked hint (E7184).
dotnet/Templates/Microsoft.macOS.Templates/macos/visualbasic/Main.vb Remove NSApplication.Init() from template entrypoint.
dotnet/Templates/Microsoft.macOS.Templates/macos/csharp/Main.cs Remove NSApplication.Init() from template entrypoint.
dotnet/targets/Xamarin.Shared.Sdk.targets Default HotReloadCompatibleBuild in Debug and wire smart-enum root descriptor into trimmer inputs.
dotnet/SingleProject.md Document shared application metadata on @(ApplicationArtifact).
docs/building-apps/build-properties.md Document ArchiveDir, HotReloadCompatibleBuild, and updated dSYM defaults.
docs/building-apps/build-items.md Document new @(ApplicationArtifact) metadata fields and precedence rules.
.github/workflows/zizmor.yml Bump zizmor action version.
.github/workflows/maestro-changelog.yml Bump actions/setup-dotnet to v6.
.github/workflows/macios-reviewer.md Update agent model identifier.
.github/workflows/macios-reviewer.lock.yml Update locked workflow metadata/model identifiers.
.github/workflows/code-radiator.md Update agent model identifier.
.github/workflows/code-radiator.lock.yml Update locked workflow metadata/model identifiers.
.github/workflows/autoformat-v2.yml Bump actions/setup-dotnet to v6.

Comment thread msbuild/Xamarin.Shared/Xamarin.Shared.targets
Comment thread tests/common/TestRuntime.LinkAll.cs
@vs-mobiletools-engineering-service2

This comment has been minimized.

…cProperties, INCallRecord, INIntentResolutionResult, MTKTextureLoaderOptions, GKGridGraph, UIDynamicAnimator, UINavigationBar, CGDataConsumer, ModelNotImplementedException, GKEntity, GKPolygonObstacle, SCNRenderer, UIKitThreadAccessException (#26289)

Improves XML documentation for 14 types:

- HMCharacteristicMetadata
- HMCharacteristicProperties
- INCallRecord
- INIntentResolutionResult
- MTKTextureLoaderOptions
- GKGridGraph
- UIDynamicAnimator
- UINavigationBar
- CGDataConsumer
- ModelNotImplementedException
- GKEntity
- GKPolygonObstacle
- SCNRenderer
- UIKitThreadAccessException

Changes:
- Replaces placeholder 'To be added.' docs with meaningful descriptions
- Removes empty `<remarks>` and `<returns>` nodes
- Fixes XML doc tag ordering (summary before param)
- Normalizes XML doc indentation

🤖 Pull request created by Copilot

---------

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

This comment has been minimized.

rolfbjarne and others added 2 commits July 24, 2026 13:18
…st on all platforms. Fixes #10457 (#26261)

Enable the existing `Runtime_RegisterEntryAssembly` linker test on all platforms.

Key the expected method presence to `Runtime.DynamicRegistrationSupported`, verifying that both `RegisterEntryAssembly` overloads are linked away when the dynamic registrar is optimized away.

Fixes #10457

🤖 Pull request created by Copilot
## Summary

- allow parameter-level `[BindAs]` in `[Protocol]` and `[Model]`
definitions while continuing to reject properties and return values
- preserve native `OriginalType` metadata and messaging signatures, and
resolve parameter attributes through mapped protocol methods in both
registrars
- use managed parameter types for trimming dependencies and generated
XML documentation IDs
- add generator, native callback, diagnostics, documentation, and
XML-doc golden coverage

## Context

This support was extracted from #26158 at @rolfbjarne’s request so that
the generalized bgen/registrar feature lands in `main` independently of
the Xcode 27 CoreSpotlight bindings. The deferred CoreSpotlight callback
will be added after this change flows to `xcode27.0`.

## Validation

- `make world` with `NO_XCODE=1` for the platform-independent `main`
feature
- full bgen suite: 399 passed, 1 skipped
- XML documentation tests: 4 passed across iOS, tvOS, Mac Catalyst, and
macOS

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dalexsoto <204671+dalexsoto@users.noreply.github.com>
Copilot-Session: b96fb7cb-f82d-4cd4-9b60-a7f899f3b42d
@rolfbjarne
rolfbjarne removed the request for review from mauroa July 24, 2026 14:16
…SSet<T> alive (#26262)

The `LinkedAwayGenericTypeAsOptionalMemberInProtocol` test verifies that a generic
type referenced only from an optional protocol member (`Foundation.NSSet<T>`) is
trimmed away when using the trimmable static registrar. It did so with:

    typeof (NSObject).Assembly.GetType (NamespacePrefix + "Foundation.NSSet`1")

Since `NamespacePrefix` is a `const string = ""`, the argument is a compile-time
constant, so ILLink's intrinsic handling of `Assembly.GetType(string)` resolves it
and marks `Foundation.NSSet\`1` as kept — the test's own assertion was the sole reason
the type survived (confirmed via `--dump-dependencies`). The result was the assertion
failing with "NSSet<T> must be linked away, otherwise this test is useless".

Fix it the same way the sibling `RemovedAttributes` test already does: copy the name
pieces into non-const locals and go through `Helper.GetType`, so ILLink can't
statically resolve the type name and keep it. With this change `NSSet<T>` is trimmed
and the test passes.

🤖 Pull request created by Copilot

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rolfbjarne and others added 3 commits July 24, 2026 18:23
…te. Fixes #26267. (#26293)

## Description

The .NET 11 iOS bindings added a new `UIMenu.Create` overload taking an `NSString? identifier` alongside the pre-existing overload taking a `UIMenuIdentifier identifier` enum:

```csharp
UIMenu Create (string title, UIImage? image, UIMenuIdentifier identifier, UIMenuOptions options, UIMenuElement[] children);
UIMenu Create (string title, UIImage? image, NSString? identifier, UIMenuOptions options, UIMenuElement[] children);
```

This is source-breaking: existing code that passes `identifier: default` (a common pattern, since the identifier is optional in UIKit) now fails to compile with **CS0121** (ambiguous call), because `default` converts to both `UIMenuIdentifier` (enum default) and `NSString?` (null).

## Fix

Add `[OverloadResolutionPriority (-1)]` to the newer `NSString` overload so the pre-existing `UIMenuIdentifier`-enum overload wins overload resolution. This keeps `identifier: default` unambiguous and preserves source compatibility, while still allowing callers to reach the `NSString` overload by passing an explicit `NSString` argument.

Also added the missing `using System.Runtime.CompilerServices;` to `src/uikit.cs`, which is required for the attribute to compile in the ApiDefinition project.

Fixes #26267

🤖 Pull request created by Copilot
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**: [20260724.15](https://dev.azure.com/dnceng/internal/_build/results?buildId=3030953) ([324417](https://maestro.dot.net/channel/10307/github:dotnet:dotnet/build/324417))
- **Date Produced**: July 25, 2026 1:33:23 AM UTC
- **Commit**: [dfdd32e8a9349462e71f687679bc7e5837b8ef4a](dotnet/dotnet@dfdd32e)
- **Branch**: [release/10.0.4xx](https://github.com/dotnet/dotnet/tree/release/10.0.4xx)

- **Dependency Updates**:
  - From [10.0.0-beta.26371.110 to 10.0.0-beta.26374.115][1]
     - Microsoft.DotNet.Arcade.Sdk
     - Microsoft.DotNet.Build.Tasks.Feed
     - Microsoft.DotNet.SharedFramework.Sdk
  - From [10.0.400-preview.0.26371.110 to 10.0.400-preview.0.26374.115][1]
     - Microsoft.NET.Sdk
  - From [10.0.400 to 10.0.400][1]
     - Microsoft.TemplateEngine.Authoring.Tasks

[1]: dotnet/dotnet@5a7ae45...dfdd32e
Generated managed registrar callbacks targeting CoreCLR still receive `UnmanagedCallersOnlyAttribute`, but no longer include its unused `EntryPoint` named field.

MonoVM and NativeAOT configurations continue to include `EntryPoint`, preserving direct-symbol lookup behavior.

Added focused assembly-preparer tests covering both CoreCLR and MonoVM.

Fixes #21732

🤖 Pull request created by Copilot

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Copilot-Session: 45717e2d-c75e-4743-aca9-b9f6a8fa9ebe
rolfbjarne and others added 5 commits July 27, 2026 15:26
…eAssemblies builds. (#26300)

The assembly-preparer's RemoveUserResourcesSubStep unconditionally skipped resource stripping for every assembly in Hot Reload compatible builds. This was too broad: linked (trimmed) assemblies are re-serialized regardless, so stripping them doesn't break Hot Reload - only reloadable (non-linked, copied) assemblies must be left untouched.

This matches the non-preparer (ILLink) code path, which only skips assemblies whose action isn't 'Link'. Without this fix, the 'prepare-assemblies|trimmable-static-registrar' variation of the 'link all' MacCatalyst test failed because embedded resources were left in the linked BundledResources assembly.

Updated the unit tests to cover both the reloadable (kept) and linked (stripped) cases in a Hot Reload build.

🤖 Pull request created by Copilot

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ionOptions, CVTime, NSInputStream, GKBehavior, GKState, NLLanguageRecognizer, NEHotspotHelperOptions, SCNScene, SLComposeViewController (#26294)

Improve XML documentation for 10 types:

- CNContactFetchRequest
- CIImageInitializationOptions
- CVTime
- NSInputStream
- GKBehavior
- GKState
- NLLanguageRecognizer
- NEHotspotHelperOptions
- SCNScene
- SLComposeViewController

Changes include adding missing summaries, fixing tag ordering (summary before param), removing empty nodes, and fixing typos.

🤖 Pull request created by Copilot

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The binding generator synthesizes C# `event` members from the `[BaseType]` delegate/EventArgs wiring, but never emitted any XML documentation for them. As a result every generated event showed up as an undocumented, publicly-visible member and had to be allow-listed in the documentation known-failures list.

This PR makes bgen emit a generated `## ` for each synthesized event (guarded by `BindingTouch.SupportsXmlDocumentation`), for both the non-generic `EventHandler` and the generic `EventHandler<T>` branches. When the binding already provides docs via `[EventArgs (XmlDocs = ...)]`, those are used instead and no generated summary is emitted. The generic branch adds a `<see cref=...>` to the generated EventArgs type; crefs resolve correctly (verified against the `VerifyNoUnresolvedCrefs` test).

With the events now documented, 67 generated-event `E:` entries are removed from `tests/cecil-tests/Documentation.KnownFailures.txt`. The remaining 38 `E:` entries in that file are hand-written events (not produced by bgen) and are intentionally left allow-listed; documenting those is a separate follow-up.

Test coverage: `tests/bgen/tests/xmldocs.cs` gains a single-parameter delegate method (`DidFinish`) so both the non-generic and generic event branches are exercised, and the four `ExpectedXmlDocs.*.xml` baselines are regenerated accordingly. The bgen `XmlDocs` test passes on all four platforms.

🤖 Pull request created by Copilot

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: c1ff8e23f14045e547182f0aa46df82d0c129866 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

rolfbjarne added a commit that referenced this pull request Jul 28, 2026
Addresses a review comment from #26292.

## Problem

In `tests/common/TestRuntime.LinkAll.cs`, the `IsLinkAll` property resolved the `+LinkerSentinel` type using a compile-time-constant type name:

```csharp
link_all = typeof (TestRuntime).Assembly.GetType (typeof (TestRuntime).FullName + "+LinkerSentinel") is null;
```

The trimmer's dataflow analysis (dotnet/runtime#127319) can resolve that constant string and preserve the `LinkerSentinel` type, which would make `IsLinkAll` incorrectly report `false` even in link-all builds.

## Fix

Introduce a `WorkAroundLinkerHeuristics` property that returns `""` at runtime (but the trimmer can't constant-fold) and append it to the type-name string, so the trimmer can no longer statically resolve `+LinkerSentinel`. This matches the pattern already used in `tests/linker/*` (e.g. `CommonLinkAllTest.cs`, `PreserveTest.cs`).

🤖 Pull request created by Copilot

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🚀 [CI Build #c1ff8e2] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 256 tests passed 🎉

Tests counts

✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
✅ 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 7 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 31 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 31 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 31 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 23 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 23 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 23 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 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: c1ff8e23f14045e547182f0aa46df82d0c129866 [PR build]

@rolfbjarne
rolfbjarne merged commit 32f4122 into net11.0 Jul 28, 2026
54 checks passed
@rolfbjarne
rolfbjarne deleted the dev/rolf/bump-main-in-net11.0-2026-07-24 branch July 28, 2026 12:21
rolfbjarne added a commit that referenced this pull request Jul 29, 2026
…iscovery (#26296)

Addresses a code review comment from #26292.

## Problem

The `_ComputeXCFrameworkDSyms` target in `msbuild/Xamarin.Shared/Xamarin.Shared.targets` filtered xcframework dSYM candidates using the MSBuild `Exists(...)` function:

```xml
<_XCFrameworkDSymToCopy
    Include="@(_XCFrameworkDSymCandidate->'%(DSymSourceDir)/%(DSymName)')"
    Condition="Exists('%(DSymSourceDir)/%(DSymName)')">
    <DSymName>%(DSymName)</DSymName>
</_XCFrameworkDSymToCopy>
```

`Exists(...)` evaluates on the MSBuild host using host path semantics. For remote builds (Windows → macOS, e.g. Hot Restart / remote Mac builds) this is wrong: the files live on the Mac, not the Windows host, so the check never finds them and the xcframework dSYMs are not copied into the archive. The old comment even claimed the target "only runs on macOS", which is misleading.

## Fix

Use the existing remote-capable `GetFileSystemEntries` task (already used elsewhere in the same file) to discover which `*.dSYM` directories actually exist under the computed `dSYMs` directory on the build machine (the Mac), and copy only those — instead of relying on the host-side `Exists(...)` function.

- The discovered directory name equals the `DSymName` metadata used for the copy destination, so the `_XCFrameworkDSymToCopy` item shape (Identity = source dSYM path, `DSymName` metadata) is preserved and `_CopyXCFrameworkDSyms` keeps working unchanged.
- `GetFileSystemEntries` now skips non-existent directories, since a framework's `dSYMs` directory may not exist.
- Updated the misleading "only runs on macOS" comment.

🤖 Pull request created by Copilot

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review This PR is ready to review/merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants