Skip to content

[Hot Reload] ManagedRegistrarStep: emit UnmanagedCallersOnly trampolines into a companion assembly. Fixes #26074.#26139

Draft
rolfbjarne wants to merge 6 commits into
mainfrom
dev/rolf/issue-26074-hot-reload-managedregistrarstep-emit-un-fd73d5
Draft

[Hot Reload] ManagedRegistrarStep: emit UnmanagedCallersOnly trampolines into a companion assembly. Fixes #26074.#26139
rolfbjarne wants to merge 6 commits into
mainfrom
dev/rolf/issue-26074-hot-reload-managedregistrarstep-emit-un-fd73d5

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

Part of the Hot Reload epic (#26069). When $(HotReloadCompatibleBuild) is enabled with the TrimmableStatic registrar, user assemblies must stay byte-for-byte unmodified. Today ManagedRegistrarStep emits the [UnmanagedCallersOnly] registrar trampolines (__Registrar_Callbacks__) and per-type constructor helpers directly into the user assembly, which breaks that requirement.

This PR relocates those trampolines (and the constructor helpers) into the per-assembly companion assembly (_<Asm>.TypeMap.dll) that the trimmable static registrar already produces, so the user assembly is left untouched. Release builds (property disabled) keep the current behavior.

What changed

  • New $(HotReloadCompatibleBuild) plumbing: property flows through _CustomLinkerOptions into Application/LinkerConfiguration; documented in docs/building-apps/build-properties.md. (Minimal self-contained plumbing; the property is fully owned by [Hot Reload] Add $(HotReloadCompatibleBuild) MSBuild property + assembly-preparer safety net #26072.)
  • Shared companion factory RegistrarCompanionAssembly.GetOrCreate — the companion _<Asm>.TypeMap.dll is now created once and shared between ManagedRegistrarStep (which emits the trampolines into it) and TrimmableRegistrarStep (which reuses it for the type map).
  • ManagedRegistrarStep relocation: when relocating, the trampolines are emitted into a top-level __Registrar_Callbacks__ in the companion; the user-side [DynamicDependency] is skipped (the trampoline stays alive via the companion's ldftn reference); leftover user-module references are re-imported into the companion module. The injected cloned constructor is replaced by an inline factory in the trampoline (RuntimeHelpers.GetUninitializedObject + set handle/flags + call the real ctor), so no constructor is added to the user type. Save is now gated on precise modification tracking so a fully-relocated user assembly is never re-serialized.

Scope

Non-generic trampolines (including constructors) are relocated now. Generic-type proxy relocation is deferred to a follow-up.

Testing

Adds a structural assembly-preparer test (RelocateRegistrarTrampolinesTests) asserting the user assembly is not re-saved and has no __Registrar_Callbacks__/cloned ctor/callback [DynamicDependency], while the companion holds the [UnmanagedCallersOnly] trampolines. The full build/runtime path requires Xcode 26.6, which isn't available in the dev environment, so CI verifies the runtime behavior.

Fixes #26074

🤖 Pull request created by Copilot

rolfbjarne and others added 4 commits July 16, 2026 19:01
… companion-assembly factory (#26074)

Groundwork for relocating the trimmable-static registrar's
[UnmanagedCallersOnly] trampolines out of user assemblies (so they stay
byte-unmodified for Hot Reload) and into the per-assembly companion
'_<Asm>.TypeMap.dll'.

- Add the $(HotReloadCompatibleBuild) property plumbing: Application flag,
  LinkerConfiguration load/save, _CustomLinkerOptions wiring and docs.
- Extract the companion-assembly creation from TrimmableRegistrarStep into a
  new shared RegistrarCompanionAssembly.GetOrCreate factory, stored in
  LinkerConfiguration.RegistrarCompanionAssemblies, so ManagedRegistrarStep can
  create/emit into the same companion earlier. TrimmableRegistrarStep now
  reuses it (behavior-preserving).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…o companion assembly (#26074)

When HotReloadCompatibleBuild is enabled with the TrimmableStatic registrar,
emit the [UnmanagedCallersOnly] registrar trampolines (and constructor helpers)
into the per-assembly companion assembly (_<Asm>.TypeMap.dll) instead of the
user assembly, so user assemblies stay byte-unmodified (a Hot Reload requirement).
Release builds (property disabled) keep the current in-user-assembly behavior.

- ManagedRegistrarStep: when relocating, switch the AppBundleRewriter to the
  companion assembly, emit the trampoline into a top-level __Registrar_Callbacks__
  type there, skip the user-side [DynamicDependency], re-import all references into
  the companion module, and track user-assembly modifications precisely so the user
  assembly isn't re-serialized.
- Constructors: instead of cloning a constructor into the user type, emit an inline
  factory (RuntimeHelpers.GetUninitializedObject + set handle/flags + call the real
  constructor) in the companion trampoline, and grant the companion access to the
  platform assembly's NSObject handle/flags setters.
- CollectUnmanagedCallersMethod: in the post-processing pass, resolve the relocated
  trampolines from the companion assembly instead of the user type.
- AppBundleRewriter: add RuntimeHelpers.GetUninitializedObject references.

Only non-generic types are relocated for now; generic-type proxy relocation is a
follow-up.

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

Adds a structural unit test verifying that when HotReloadCompatibleBuild is
enabled with the TrimmableStatic registrar, the registrar trampolines are
emitted into the companion assembly (_Test.TypeMap.dll) and the user assembly
is left byte-unmodified (not re-saved, no __Registrar_Callbacks__ type, no
cloned ctor, no injected [DynamicDependency]).

The test can't run in this environment (requires Xcode 26.6 to build the
workload); CI verifies it.

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

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 updates the trimmable static registrar pipeline to support Hot Reload compatibility by relocating [UnmanagedCallersOnly] registrar trampolines (and constructor helper logic) out of user assemblies and into the per-assembly companion _\<Asm>.TypeMap.dll assembly, so user assemblies can remain byte-for-byte unchanged when $(HotReloadCompatibleBuild) is enabled.

Changes:

  • Introduces a shared RegistrarCompanionAssembly.GetOrCreate factory so ManagedRegistrarStep and TrimmableRegistrarStep can share the same companion assembly instance.
  • Relocates non-generic registrar trampolines (and ctor helper behavior) into the companion assembly, with reference re-importing to ensure valid Cecil module ownership.
  • Adds an assembly-preparer test asserting the user assembly is not re-saved and that trampolines live in the companion assembly, plus MSBuild plumbing/docs for HotReloadCompatibleBuild.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/dotnet-linker/Steps/TrimmableRegistrarStep.cs Reuses/creates the per-assembly companion TypeMap assembly via RegistrarCompanionAssembly.GetOrCreate.
tools/dotnet-linker/Steps/ManagedRegistrarStep.cs Relocates [UnmanagedCallersOnly] trampolines + ctor helper logic into the companion assembly when Hot Reload compatibility is enabled.
tools/dotnet-linker/RegistrarCompanionAssembly.cs New shared helper to create/cache companion assemblies and track IgnoresAccessChecksTo needs.
tools/dotnet-linker/LinkerConfiguration.cs Adds companion-assembly cache + config plumbing for HotReloadCompatibleBuild.
tools/dotnet-linker/AppBundleRewriter.cs Adds Cecil helpers for RuntimeHelpers.GetUninitializedObject to support relocated ctor logic.
tools/common/Application.cs Adds HotReloadCompatibleBuild flag to the tool configuration surface.
tools/assembly-preparer/assembly-preparer.csproj Includes the new companion-assembly helper in assembly-preparer build.
tests/assembly-preparer/RelocateRegistrarTrampolinesTests.cs New structural test verifying trampolines are relocated and user assembly remains untouched.
tests/assembly-preparer/BaseClass.cs Adds a helper to run assembly-preparer in Hot Reload + trimmable-static mode and return user/companion assemblies.
dotnet/targets/Xamarin.Shared.Sdk.targets Flows $(HotReloadCompatibleBuild) into _CustomLinkerOptions.
docs/building-apps/build-properties.md Documents the new HotReloadCompatibleBuild MSBuild property.

Comment on lines +434 to +436
var relocate = ShouldRelocateTrampolines (method);
RegistrarCompanionAssembly? companion = null;
if (relocate) {
Comment thread dotnet/targets/Xamarin.Shared.Sdk.targets
Comment thread tools/dotnet-linker/RegistrarCompanionAssembly.cs Outdated
@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: 93534bfd372d2f67f2bddbc8560c7283c003869a [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [PR Build #93534bf] Build failed (Build macOS tests) 🔥

Build failed for the job 'Build macOS tests' (with job status 'Failed')

Pipeline on Agent
Hash: 93534bfd372d2f67f2bddbc8560c7283c003869a [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [CI Build #93534bf] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

7 tests crashed, 145 tests failed, 13 tests passed.

Failures

❌ assembly-processing tests

1 tests failed, 0 tests passed.

Failed tests

  • Assembly processing tests: Failed (Execution failed with exit code 1)
    • AssemblyPreparerTests.InlineDlfcnMethodsStepTests.MarkedTest(iOS...: System.ArgumentException : An item with the same key has already been added. Key: HotReloadCompatibleBuild
      ParamName:
    • AssemblyPreparerTests.InlineDlfcnMethodsStepTests.MarkedTest(Mac...: System.ArgumentException : An item with the same key has already been added. Key: HotReloadCompatibleBuild
      ParamName:
    • AssemblyPreparerTests.InlineDlfcnMethodsStepTests.MarkedTest(Mac...: System.ArgumentException : An item with the same key has already been added. Key: HotReloadCompatibleBuild
      ParamName:
    • ... and 53 more

Html Report (VSDrops) Download

❌ dotnettests tests (iOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.AppIconTest.AlternateAppIcon(iOS,"ios-arm64"): 'dotnet build' failed with exit code 1
      Full command: /Users/cloudtest/vss/_work/1/s/macios/builds/downloads/dotnet-sdk-10.0.400-...
    • Xamarin.Tests.AppIconTest.AlternateAppIcon(iOS,"iossimulator-x64...: 'dotnet build' failed with exit code 1
      Full command: /Users/cloudtest/vss/_work/1/s/macios/builds/downloads/dotnet-sdk-10.0.400-...
    • Xamarin.Tests.AppIconTest.AlternateAppIcons(iOS,"ios-arm64"): 'dotnet build' failed with exit code 1
      Full command: /Users/cloudtest/vss/_work/1/s/macios/builds/downloads/dotnet-sdk-10.0.400-...
    • ... and 122 more

Html Report (VSDrops) Download

❌ dotnettests tests (MacCatalyst)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.AppIconTest.AlternateAppIcon(MacCatalyst,"maccatal...: 'dotnet build' failed with exit code 1
      Full command: /Users/cloudtest/vss/_work/1/s/macios/builds/downloads/dotnet-sdk-10.0.400-...
    • Xamarin.Tests.AppIconTest.AlternateAppIcon(MacCatalyst,"maccatal...: 'dotnet build' failed with exit code 1
      Full command: /Users/cloudtest/vss/_work/1/s/macios/builds/downloads/dotnet-sdk-10.0.400-...
    • Xamarin.Tests.AppIconTest.AlternateAppIcons(MacCatalyst,"maccata...: 'dotnet build' failed with exit code 1
      Full command: /Users/cloudtest/vss/_work/1/s/macios/builds/downloads/dotnet-sdk-10.0.400-...
    • ... and 117 more

Html Report (VSDrops) Download

❌ dotnettests tests (macOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.AppIconTest.AlternateAppIcon(MacOSX,"osx-arm64;osx...: 'dotnet build' failed with exit code 1
      Full command: /Users/cloudtest/vss/_work/1/s/macios/builds/downloads/dotnet-sdk-10.0.400-...
    • Xamarin.Tests.AppIconTest.AlternateAppIcon(MacOSX,"osx-x64"): 'dotnet build' failed with exit code 1
      Full command: /Users/cloudtest/vss/_work/1/s/macios/builds/downloads/dotnet-sdk-10.0.400-...
    • Xamarin.Tests.AppIconTest.AlternateAppIcons(MacOSX,"osx-arm64;os...: 'dotnet build' failed with exit code 1
      Full command: /Users/cloudtest/vss/_work/1/s/macios/builds/downloads/dotnet-sdk-10.0.400-...
    • ... and 117 more

Html Report (VSDrops) Download

❌ dotnettests tests (tvOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.AppIconTest.AlternateAppIcon(TVOS,"tvos-arm64"): 'dotnet build' failed with exit code 1
      Full command: /Users/cloudtest/vss/_work/1/s/macios/builds/downloads/dotnet-sdk-10.0.400-...
    • Xamarin.Tests.AppIconTest.AlternateAppIcon(TVOS,"tvossimulator-x...: 'dotnet build' failed with exit code 1
      Full command: /Users/cloudtest/vss/_work/1/s/macios/builds/downloads/dotnet-sdk-10.0.400-...
    • Xamarin.Tests.AppIconTest.AlternateAppIcons(TVOS,"tvos-arm64"): 'dotnet build' failed with exit code 1
      Full command: /Users/cloudtest/vss/_work/1/s/macios/builds/downloads/dotnet-sdk-10.0.400-...
    • ... and 70 more

Html Report (VSDrops) Download

❌ framework tests

🔥 Failed catastrophically on VSTS: test results - framework (no summary found).

Html Report (VSDrops) Download

❌ fsharp tests

4 tests failed, 0 tests passed.

Failed tests

  • fsharp/macOS/Debug: BuildFailure
  • fsharp/Mac Catalyst/Debug: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • fsharp/iOS - simulator/Debug: BuildFailure
  • fsharp/tvOS - simulator/Debug: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))

Html Report (VSDrops) Download

❌ interdependent-binding-projects tests

4 tests failed, 0 tests passed.

Failed tests

  • interdependent-binding-projects/macOS/Debug: BuildFailure
  • interdependent-binding-projects/Mac Catalyst/Debug: BuildFailure
  • interdependent-binding-projects/iOS - simulator/Debug: BuildFailure
  • interdependent-binding-projects/tvOS - simulator/Debug: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))

Html Report (VSDrops) Download

❌ introspection tests

4 tests failed, 0 tests passed.

Failed tests

  • introspection/macOS/Debug: BuildFailure
  • introspection/Mac Catalyst/Debug: BuildFailure
  • introspection/iOS - simulator/Debug: BuildFailure
  • introspection/tvOS - simulator/Debug: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))

Html Report (VSDrops) Download

❌ linker tests (iOS)

15 tests failed, 0 tests passed.

Failed tests

  • dont link/iOS - simulator/Debug: BuildFailure
  • dont link/iOS - simulator/Release: BuildFailure
  • dont link/iOS - simulator/Debug (PrepareAssemblies, MonoVM, Dynamic Registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • dont link/iOS - simulator/Debug (PrepareAssemblies, MonoVM, Managed Static Registrar): BuildFailure
  • dont link/iOS - simulator/Release (PrepareAssemblies, MonoVM, Dynamic Registrar): BuildFailure
  • dont link/iOS - simulator/Release (PrepareAssemblies, MonoVM, Managed Static Registrar): BuildFailure
  • link sdk/iOS - simulator/Debug: BuildFailure
  • link sdk/iOS - simulator/Release: BuildFailure
  • link all/iOS - simulator/Debug: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • link all/iOS - simulator/Release: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • link all/iOS - simulator/Debug (don't bundle original resources): BuildFailure
  • trimmode copy/iOS - simulator/Debug: BuildFailure
  • trimmode copy/iOS - simulator/Release: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • trimmode link/iOS - simulator/Debug: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • trimmode link/iOS - simulator/Release: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))

Html Report (VSDrops) Download

❌ linker tests (MacCatalyst)

15 tests failed, 0 tests passed.

Failed tests

  • dont link/Mac Catalyst/Debug: BuildFailure
  • dont link/Mac Catalyst/Debug (PrepareAssemblies, MonoVM, Dynamic Registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • dont link/Mac Catalyst/Debug (PrepareAssemblies, MonoVM, Managed Static Registrar): BuildFailure
  • dont link/Mac Catalyst/Release: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • dont link/Mac Catalyst/Release (PrepareAssemblies, MonoVM, Dynamic Registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • dont link/Mac Catalyst/Release (PrepareAssemblies, MonoVM, Managed Static Registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • link sdk/Mac Catalyst/Debug: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • link sdk/Mac Catalyst/Release: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • link all/Mac Catalyst/Debug: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • link all/Mac Catalyst/Debug (don't bundle original resources): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • link all/Mac Catalyst/Release: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • trimmode copy/Mac Catalyst/Debug: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • trimmode copy/Mac Catalyst/Release: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • trimmode link/Mac Catalyst/Debug: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • trimmode link/Mac Catalyst/Release: BuildFailure

Html Report (VSDrops) Download

❌ linker tests (macOS)

21 tests failed, 0 tests passed.

Failed tests

  • dont link/macOS/Debug: BuildFailure
  • dont link/macOS/Debug (PrepareAssemblies, CoreCLR, Dynamic Registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • dont link/macOS/Debug (PrepareAssemblies, CoreCLR, Managed Static Registrar): BuildFailure
  • dont link/macOS/Debug (PrepareAssemblies, CoreCLR, Trimmable Static Registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • dont link/macOS/Release: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • dont link/macOS/Release (PrepareAssemblies, CoreCLR, Dynamic Registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • dont link/macOS/Release (PrepareAssemblies, CoreCLR, Managed Static Registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • dont link/macOS/Release (PrepareAssemblies, CoreCLR, Trimmable Static Registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • link sdk/macOS/Debug: BuildFailure
  • link sdk/macOS/Debug (PrepareAssemblies, CoreCLR, Trimmable Static Registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • link sdk/macOS/Release: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • link sdk/macOS/Release (PrepareAssemblies, CoreCLR, Trimmable Static Registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • link all/macOS/Debug: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • link all/macOS/Debug (PrepareAssemblies, CoreCLR, Trimmable Static Registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • link all/macOS/Debug (don't bundle original resources): BuildFailure
  • link all/macOS/Release: BuildFailure
  • link all/macOS/Release (PrepareAssemblies, CoreCLR, Trimmable Static Registrar): BuildFailure
  • trimmode copy/macOS/Debug: BuildFailure
  • trimmode copy/macOS/Release: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • trimmode link/macOS/Debug: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • trimmode link/macOS/Release: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))

Html Report (VSDrops) Download

❌ linker tests (tvOS)

15 tests failed, 0 tests passed.

Failed tests

  • dont link/tvOS - simulator/Debug: BuildFailure
  • dont link/tvOS - simulator/Release: BuildFailure
  • dont link/tvOS - simulator/Debug (PrepareAssemblies, MonoVM, Dynamic Registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • dont link/tvOS - simulator/Debug (PrepareAssemblies, MonoVM, Managed Static Registrar): BuildFailure
  • dont link/tvOS - simulator/Release (PrepareAssemblies, MonoVM, Dynamic Registrar): BuildFailure
  • dont link/tvOS - simulator/Release (PrepareAssemblies, MonoVM, Managed Static Registrar): BuildFailure
  • link sdk/tvOS - simulator/Debug: BuildFailure
  • link sdk/tvOS - simulator/Release: BuildFailure
  • link all/tvOS - simulator/Debug: BuildFailure
  • link all/tvOS - simulator/Release: BuildFailure
  • link all/tvOS - simulator/Debug (don't bundle original resources): BuildFailure
  • trimmode copy/tvOS - simulator/Debug: BuildFailure
  • trimmode copy/tvOS - simulator/Release: BuildFailure
  • trimmode link/tvOS - simulator/Debug: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • trimmode link/tvOS - simulator/Release: BuildFailure

Html Report (VSDrops) Download

❌ monotouch tests (iOS)

19 tests failed, 0 tests passed.

Failed tests

  • monotouch-test/iOS - simulator/Debug: BuildFailure
  • monotouch-test/iOS - simulator/Release (link sdk): BuildFailure
  • monotouch-test/iOS - simulator/Release (link all): BuildFailure
  • monotouch-test/iOS - simulator/Debug (PrepareAssemblies): BuildFailure
  • monotouch-test/iOS - simulator/Debug (PrepareAssemblies, inline dlfcn, dont link): BuildFailure
  • monotouch-test/iOS - simulator/Debug (LinkSdk): BuildFailure
  • monotouch-test/iOS - simulator/Debug (static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/iOS - simulator/Release (all optimizations): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/iOS - simulator/Release (NativeAOT): BuildFailure
  • monotouch-test/iOS - simulator/Release (trimmable static registrar, NativeAOT): BuildFailure
  • monotouch-test/iOS - simulator/Debug (managed static registrar): BuildFailure
  • monotouch-test/iOS - simulator/Release (managed static registrar, all optimizations): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/iOS - simulator/Debug (interpreter): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/iOS - simulator/Release (interpreter): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/iOS - simulator/Release (compat inline Class.GetHandle): BuildFailure
  • monotouch-test/iOS - simulator/Release (strict inline Class.GetHandle): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/iOS - simulator/Release (compat inline dlfcn): BuildFailure
  • monotouch-test/iOS - simulator/Release (strict inline dlfcn, link sdk): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/iOS - simulator/Release (NativeAOT, .NET 11 defaults): BuildFailure

Html Report (VSDrops) Download

❌ monotouch tests (MacCatalyst)

🔥 Failed catastrophically on VSTS: test results - monotouch_maccatalyst (no summary found).

Html Report (VSDrops) Download

❌ monotouch tests (macOS)

19 tests failed, 0 tests passed.

Failed tests

  • monotouch-test/macOS/Debug: BuildFailure
  • monotouch-test/macOS/Release (link sdk): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Release (link all): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Debug (PrepareAssemblies): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Debug (PrepareAssemblies, inline dlfcn, dont link): BuildFailure
  • monotouch-test/macOS/Debug (managed static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Debug (trimmable static registrar): BuildFailure
  • monotouch-test/macOS/Debug (static registrar): BuildFailure
  • monotouch-test/macOS/Release (managed static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Release (trimmable static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Release (managed static registrar, all optimizations): BuildFailure
  • monotouch-test/macOS/Release (trimmable static registrar, all optimizations): BuildFailure
  • monotouch-test/macOS/Release (NativeAOT): BuildFailure
  • monotouch-test/macOS/Release (NativeAOT, .NET 11 defaults): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Release (trimmable static registrar, NativeAOT): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Release (static registrar): BuildFailure
  • monotouch-test/macOS/Release (static registrar, all optimizations): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Release (compat inline dlfcn): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Release (strict inline dlfcn, link sdk): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))

Html Report (VSDrops) Download

❌ monotouch tests (tvOS)

19 tests failed, 0 tests passed.

Failed tests

  • monotouch-test/tvOS - simulator/Debug: BuildFailure
  • monotouch-test/tvOS - simulator/Release (link sdk): BuildFailure
  • monotouch-test/tvOS - simulator/Release (link all): BuildFailure
  • monotouch-test/tvOS - simulator/Debug (PrepareAssemblies): BuildFailure
  • monotouch-test/tvOS - simulator/Debug (PrepareAssemblies, inline dlfcn, dont link): BuildFailure
  • monotouch-test/tvOS - simulator/Debug (LinkSdk): BuildFailure
  • monotouch-test/tvOS - simulator/Debug (static registrar): BuildFailure
  • monotouch-test/tvOS - simulator/Release (all optimizations): BuildFailure
  • monotouch-test/tvOS - simulator/Release (NativeAOT): BuildFailure
  • monotouch-test/tvOS - simulator/Release (trimmable static registrar, NativeAOT): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/tvOS - simulator/Debug (managed static registrar): BuildFailure
  • monotouch-test/tvOS - simulator/Release (managed static registrar, all optimizations): BuildFailure
  • monotouch-test/tvOS - simulator/Debug (interpreter): BuildFailure
  • monotouch-test/tvOS - simulator/Release (interpreter): BuildFailure
  • monotouch-test/tvOS - simulator/Release (compat inline Class.GetHandle): BuildFailure
  • monotouch-test/tvOS - simulator/Release (strict inline Class.GetHandle): BuildFailure
  • monotouch-test/tvOS - simulator/Release (compat inline dlfcn): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/tvOS - simulator/Release (strict inline dlfcn, link sdk): BuildFailure
  • monotouch-test/tvOS - simulator/Release (NativeAOT, .NET 11 defaults): BuildFailure

Html Report (VSDrops) Download

❌ windows tests

1 tests failed, 2 tests passed.

Failed tests

  • Remote .NET tests/Xamarin.Tests.WindowsTest.AssemblyPreparerRemoteTest(iOS,"ios-arm64"): Failed: 'dotnet build' failed with exit code 1

  • Remote .NET tests/Xamarin.Tests.PostBuildTest.BuildIpaAndArchiveOnRemoteWindowsTest(iOS,"ios-arm64"): Failed: 'dotnet build' failed with exit code 1

  • Remote .NET tests/Xamarin.Tests.IncrementalBuildTest.CodeChangeSkipsTargetsOnRemoteWindows(iOS,"iossimulator-arm64",True): Failed: 'dotnet build' failed with exit code 1

  • Remote .NET tests/Xamarin.Tests.DotNetProjectTest.AppWithLibraryWithResourcesReferenceOnRemoteWindows(iOS,"ios-arm64",True): Failed: 'dotnet build' failed with exit code 1

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

  • Remote .NET tests/Xamarin.Tests.WindowsTest.StripTest(iOS,"ios-arm64","Release"): Failed: 'dotnet build' failed with exit code 1

  • Remote .NET tests/Xamarin.Tests.WindowsTest.BundleStructureWithRemoteMac(iOS,"ios-arm64",All,"Debug"): Failed: 'dotnet build' failed with exit code 1

  • Remote .NET tests/Xamarin.Tests.WindowsTest.PluralRuntimeIdentifiersWithRemoteMac(iOS,"iossimulator-arm64;iossimulator-x64","Debug"): Failed: 'dotnet build' timed out after 00:10:00

  • Remote .NET tests/Xamarin.Tests.DotNetProjectTest.BuildProjectsWithExtensionsOnRemoteWindows(iOS,"ios-arm64",False): Failed: 'dotnet build' failed with exit code 1

  • Remote .NET tests/Xamarin.Tests.WindowsTest.BuildEmbeddedFrameworkInBindingProjectApp(iOS,"iossimulator-arm64"): Failed: 'dotnet build' failed with exit code 1

  • Remote .NET tests/Xamarin.Tests.DotNetProjectTest.AppWithLibraryWithResourcesReferenceOnRemoteWindows(iOS,"ios-arm64",False): Failed: 'dotnet build' failed with exit code 1

  • Remote .NET tests/Xamarin.Tests.WindowsTest.RemoteTest(iOS,"ios-arm64"): Failed: 'dotnet build' failed with exit code 1

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

  • Remote .NET tests/Xamarin.Tests.IncrementalBuildTest.CodeChangeSkipsTargetsOnRemoteWindows(iOS,"iossimulator-arm64",False): Failed: 'dotnet build' failed with exit code 1

Html Report (VSDrops) Download

❌ xcframework tests

4 tests failed, 0 tests passed.

Failed tests

  • xcframework-test/macOS/Debug: BuildFailure
  • xcframework-test/Mac Catalyst/Debug: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • xcframework-test/iOS - simulator/Debug: BuildFailure
  • xcframework-test/tvOS - simulator/Debug: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))

Html Report (VSDrops) Download

❌ Tests on macOS Monterey (12) tests

⚠️ Tests did not run because the Build macOS tests job failed.

Html Report (VSDrops) Download

❌ Tests on macOS Ventura (13) tests

⚠️ Tests did not run because the Build macOS tests job failed.

Html Report (VSDrops) Download

❌ Tests on macOS Sonoma (14) tests

⚠️ Tests did not run because the Build macOS tests job failed.

Html Report (VSDrops) Download

❌ Tests on macOS Sequoia (15) tests

⚠️ Tests did not run because the Build macOS tests job failed.

Html Report (VSDrops) Download

❌ Tests on macOS Tahoe (26) tests

⚠️ Tests did not run because the Build macOS tests job failed.

Html Report (VSDrops) Download

Successes

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) [Download](https://devdiv.visualstudio.com/DevDiv/_apis/build/builds/14678450/artifacts?artifactName=HtmlReport-simulator_tes\n\nThe message from CI is too large for the GitHub comments. You can find the full results here.

rolfbjarne and others added 2 commits July 17, 2026 16:40
…hot-reload-managedregistrarstep-emit-un-fd73d5
- ManagedRegistrarStep: set modifiedCurrentAssembly when a trampoline (or a
  generic-type proxy interface/implementation) is emitted into the user
  assembly on the non-relocated path. Previously the flag was only set on the
  ImplementConstruct paths, so with HotReloadCompatibleBuild enabled a modified
  user assembly (e.g. one with generic exported types) could be skipped when
  saving, dropping the generated trampolines/proxies. (review: error)

- Reconcile with the HotReloadCompatibleBuild property that landed on main via a
  sibling PR: drop the duplicate Application.HotReloadCompatibleBuild field, the
  duplicate config-key handler (a duplicate key in the collection initializer
  would throw at runtime) and the duplicate _CustomLinkerOptions entry in
  Xamarin.Shared.Sdk.targets; use Configuration.HotReloadCompatibleBuild
  everywhere. (review: warning)

- Make RegistrarCompanionAssembly internal + sealed (and the
  RegistrarCompanionAssemblies dictionary internal to match). (review: suggestion)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Hot Reload] ManagedRegistrarStep: emit UnmanagedCallersOnly trampolines/proxies into a companion assembly

3 participants