Skip to content

[dotnet] Use RootMode=Visible for app extensions. Fixes #27342 - #27355

Merged
rolfbjarne merged 49 commits into
mainfrom
dev/rolf/extension-root-mode
Nov 24, 2026
Merged

rolfbjarne merged 49 commits into
mainfrom
dev/rolf/extension-root-mode

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

App extensions are library projects without an entry point, so we've been rooting their main assembly with RootMode=Library. That mode is meant for trimming the runtime libraries, and a recent ILLink change (dotnet/runtime#136495) makes it disable reference-scope updates for the whole link. Fully trimmed app extensions then keep references to the trimmed-away System.Runtime facade, and the managed registrar fails with MT2430/MT2431.

The ILLink maintainers suggested using RootMode=Visible instead (dotnet/runtime#137672 (comment)), which roots the visible API of the assembly without the library-only behavior.

This also re-enables the BuildTrimmedExtensionProject test, which was ignored in #27092.

Fixes #27342

🤖 Pull request created by Copilot

Note

This pull request was drafted with GitHub Copilot.

dotnet-maestro Bot and others added 30 commits October 28, 2026 07:15
…027.11

On relative base path root
Microsoft.NET.Runtime.MonoTargets.Sdk , Microsoft.NET.ILLink , Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Ref From Version 12.0.0-alpha.1.26523.103 -> To Version 12.0.0-alpha.1.26527.111
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.SharedFramework.Sdk From Version 12.0.0-beta.26523.103 -> To Version 12.0.0-beta.26527.111
Microsoft.DotNet.Cecil From Version 0.11.5-preview.26523.103 -> To Version 0.11.5-preview.26527.111
Microsoft.NET.Sdk , Microsoft.TemplateEngine.Authoring.Tasks From Version 12.0.100-alpha.1.26523.103 -> To Version 12.0.100-alpha.1.26527.111
…028.11

On relative base path root
Microsoft.NET.Runtime.MonoTargets.Sdk , Microsoft.NET.ILLink , Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Ref From Version 12.0.0-alpha.1.26523.103 -> To Version 12.0.0-alpha.1.26528.111
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.SharedFramework.Sdk From Version 12.0.0-beta.26523.103 -> To Version 12.0.0-beta.26528.111
Microsoft.DotNet.Cecil From Version 0.11.5-preview.26523.103 -> To Version 0.11.5-preview.26528.111
Microsoft.NET.Sdk , Microsoft.TemplateEngine.Authoring.Tasks From Version 12.0.100-alpha.1.26523.103 -> To Version 12.0.100-alpha.1.26528.111
…029.6

On relative base path root
Microsoft.NET.Runtime.MonoTargets.Sdk , Microsoft.NET.ILLink , Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Ref From Version 12.0.0-alpha.1.26523.103 -> To Version 12.0.0-alpha.1.26529.106
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.SharedFramework.Sdk From Version 12.0.0-beta.26523.103 -> To Version 12.0.0-beta.26529.106
Microsoft.DotNet.Cecil From Version 0.11.5-preview.26523.103 -> To Version 0.11.5-preview.26529.106
Microsoft.NET.Sdk , Microsoft.TemplateEngine.Authoring.Tasks From Version 12.0.100-alpha.1.26523.103 -> To Version 12.0.100-alpha.1.26529.106
…030.11

On relative base path root
Microsoft.NET.Runtime.MonoTargets.Sdk , Microsoft.NET.ILLink , Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Ref From Version 12.0.0-alpha.1.26523.103 -> To Version 12.0.0-alpha.1.26530.111
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.SharedFramework.Sdk From Version 12.0.0-beta.26523.103 -> To Version 12.0.0-beta.26530.111
Microsoft.DotNet.Cecil From Version 0.11.5-preview.26523.103 -> To Version 0.11.5-preview.26530.111
Microsoft.NET.Sdk , Microsoft.TemplateEngine.Authoring.Tasks From Version 12.0.100-alpha.1.26523.103 -> To Version 12.0.100-alpha.1.26530.111
…031.2

On relative base path root
Microsoft.NET.Runtime.MonoTargets.Sdk , Microsoft.NET.ILLink , Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Ref From Version 12.0.0-alpha.1.26523.103 -> To Version 12.0.0-alpha.1.26531.102
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.SharedFramework.Sdk From Version 12.0.0-beta.26523.103 -> To Version 12.0.0-beta.26531.102
Microsoft.DotNet.Cecil From Version 0.11.5-preview.26523.103 -> To Version 0.11.5-preview.26531.102
Microsoft.NET.Sdk , Microsoft.TemplateEngine.Authoring.Tasks From Version 12.0.100-alpha.1.26523.103 -> To Version 12.0.100-alpha.1.26531.102
…101.1

On relative base path root
Microsoft.NET.Runtime.MonoTargets.Sdk , Microsoft.NET.ILLink , Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Ref From Version 12.0.0-alpha.1.26523.103 -> To Version 12.0.0-alpha.1.26551.101
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.SharedFramework.Sdk From Version 12.0.0-beta.26523.103 -> To Version 12.0.0-beta.26551.101
Microsoft.DotNet.Cecil From Version 0.11.5-preview.26523.103 -> To Version 0.11.5-preview.26551.101
Microsoft.NET.Sdk , Microsoft.TemplateEngine.Authoring.Tasks From Version 12.0.100-alpha.1.26523.103 -> To Version 12.0.100-alpha.1.26551.101
…103.10

On relative base path root
Microsoft.NET.Runtime.MonoTargets.Sdk , Microsoft.NET.ILLink , Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Ref From Version 12.0.0-alpha.1.26523.103 -> To Version 12.0.0-alpha.1.26553.110
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.SharedFramework.Sdk From Version 12.0.0-beta.26523.103 -> To Version 12.0.0-beta.26553.110
Microsoft.DotNet.Cecil From Version 0.11.5-preview.26523.103 -> To Version 0.11.5-preview.26553.110
Microsoft.NET.Sdk , Microsoft.TemplateEngine.Authoring.Tasks From Version 12.0.100-alpha.1.26523.103 -> To Version 12.0.100-alpha.1.26553.110
…104.4

On relative base path root
Microsoft.NET.Runtime.MonoTargets.Sdk , Microsoft.NET.ILLink , Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Ref From Version 12.0.0-alpha.1.26523.103 -> To Version 12.0.0-alpha.1.26554.104
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.SharedFramework.Sdk From Version 12.0.0-beta.26523.103 -> To Version 12.0.0-beta.26554.104
Microsoft.DotNet.Cecil From Version 0.11.5-preview.26523.103 -> To Version 0.11.5-preview.26554.104
Microsoft.NET.Sdk , Microsoft.TemplateEngine.Authoring.Tasks From Version 12.0.100-alpha.1.26523.103 -> To Version 12.0.100-alpha.1.26554.104
…105.6

On relative base path root
Microsoft.NET.Runtime.MonoTargets.Sdk , Microsoft.NET.ILLink , Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Ref From Version 12.0.0-alpha.1.26523.103 -> To Version 12.0.0-alpha.1.26555.106
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.SharedFramework.Sdk From Version 12.0.0-beta.26523.103 -> To Version 12.0.0-beta.26555.106
Microsoft.DotNet.Cecil From Version 0.11.5-preview.26523.103 -> To Version 0.11.5-preview.26555.106
Microsoft.NET.Sdk , Microsoft.TemplateEngine.Authoring.Tasks From Version 12.0.100-alpha.1.26523.103 -> To Version 12.0.100-alpha.1.26555.106
…106.15

On relative base path root
Microsoft.NET.Runtime.MonoTargets.Sdk , Microsoft.NET.ILLink , Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Ref From Version 12.0.0-alpha.1.26523.103 -> To Version 12.0.0-alpha.1.26556.115
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.SharedFramework.Sdk From Version 12.0.0-beta.26523.103 -> To Version 12.0.0-beta.26556.115
Microsoft.DotNet.Cecil From Version 0.11.5-preview.26523.103 -> To Version 0.11.5-preview.26556.115
Microsoft.NET.Sdk , Microsoft.TemplateEngine.Authoring.Tasks From Version 12.0.100-alpha.1.26523.103 -> To Version 12.0.100-alpha.1.26556.115
…109.13

On relative base path root
Microsoft.NET.Runtime.MonoTargets.Sdk , Microsoft.NET.ILLink , Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Ref From Version 12.0.0-alpha.1.26523.103 -> To Version 12.0.0-alpha.1.26559.113
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.SharedFramework.Sdk From Version 12.0.0-beta.26523.103 -> To Version 12.0.0-beta.26559.113
Microsoft.DotNet.Cecil From Version 0.11.5-preview.26523.103 -> To Version 0.11.5-preview.26559.113
Microsoft.NET.Sdk , Microsoft.TemplateEngine.Authoring.Tasks From Version 12.0.100-alpha.1.26523.103 -> To Version 12.0.100-alpha.1.26559.113
…110.9

On relative base path root
Microsoft.NET.Runtime.MonoTargets.Sdk , Microsoft.NET.ILLink , Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Ref From Version 12.0.0-alpha.1.26523.103 -> To Version 12.0.0-alpha.1.26560.109
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.SharedFramework.Sdk From Version 12.0.0-beta.26523.103 -> To Version 12.0.0-beta.26560.109
Microsoft.DotNet.Cecil From Version 0.11.5-preview.26523.103 -> To Version 0.11.5-preview.26560.109
Microsoft.NET.Sdk , Microsoft.TemplateEngine.Authoring.Tasks From Version 12.0.100-alpha.1.26523.103 -> To Version 12.0.100-alpha.1.26560.109
…107.2

On relative base path root
Microsoft.NET.Runtime.MonoTargets.Sdk , Microsoft.NET.ILLink , Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Ref From Version 12.0.0-alpha.1.26523.103 -> To Version 12.0.0-alpha.1.26557.102
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.SharedFramework.Sdk From Version 12.0.0-beta.26523.103 -> To Version 12.0.0-beta.26557.102
Microsoft.DotNet.Cecil From Version 0.11.5-preview.26523.103 -> To Version 0.11.5-preview.26557.102
Microsoft.NET.Sdk , Microsoft.TemplateEngine.Authoring.Tasks From Version 12.0.100-alpha.1.26523.103 -> To Version 12.0.100-alpha.1.26557.102
…112.5

On relative base path root
Microsoft.NET.Runtime.MonoTargets.Sdk , Microsoft.NET.ILLink , Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Ref From Version 12.0.0-alpha.1.26523.103 -> To Version 12.0.0-alpha.1.26562.105
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.SharedFramework.Sdk From Version 12.0.0-beta.26523.103 -> To Version 12.0.0-beta.26562.105
Microsoft.DotNet.Cecil From Version 0.11.5-preview.26523.103 -> To Version 0.11.5-preview.26562.105
Microsoft.NET.Sdk , Microsoft.TemplateEngine.Authoring.Tasks From Version 12.0.100-alpha.1.26523.103 -> To Version 12.0.100-alpha.1.26562.105
rolfbjarne and others added 8 commits November 16, 2026 14:38
The ILLink dependency update leaves references to a trimmed System.Runtime facade, causing the managed registrar to fail when building fully trimmed app extensions.

Temporarily ignore all platform cases and reference tracking issue #27342 so they can be re-enabled when the upstream ILLink issue is resolved.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 0b651f79-7144-4fdd-a974-d175a273130d
…116.17

On relative base path root
Microsoft.NET.Runtime.MonoTargets.Sdk , Microsoft.NET.ILLink , Microsoft.NET.ILLink.Tasks , Microsoft.NETCore.App.Ref From Version 12.0.0-alpha.1.26523.103 -> To Version 12.0.0-alpha.1.26566.117
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.SharedFramework.Sdk From Version 12.0.0-beta.26523.103 -> To Version 12.0.0-beta.26566.117
Microsoft.DotNet.Cecil From Version 0.11.5-preview.26523.103 -> To Version 0.11.5-preview.26566.117
Microsoft.NET.Sdk , Microsoft.TemplateEngine.Authoring.Tasks From Version 12.0.100-alpha.1.26523.103 -> To Version 12.0.100-alpha.1.26566.117
App extensions now use RootMode=Visible, which avoids the ILLink library-mode behavior that broke this test.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 12:34

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.

🟢 Approval recommended

No active review issues were identified for the app-extension trimming changes.

No open issues 🎉

What changed in this PR

Updates app-extension trimming to address the managed registrar failures tracked in #27342 after the ILLink dependency update.

Changes:

  • Uses RootMode=Visible instead of Library for app-extension roots, avoiding library-only behavior that disables reference-scope updates.
  • Re-enables BuildTrimmedExtensionProject regression coverage.
File Description
tests/​dotnet/​UnitTests/​ProjectTest.cs Removes the ignore attribute from the trimmed-extension test.
dotnet/​targets/​Xamarin.Shared.Sdk.targets Changes both app-extension root paths to Visible and updates the explanatory comment.

Review effort: Balanced

@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: 488e7bd937420e07a378a4ee1764b6bcba9d3ed3 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [CI Build #488e7bd] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

0 tests crashed, 2 tests failed, 195 tests passed.

Failures

❌ assembly-processing tests

1 tests failed, 0 tests passed.

Failed tests

  • Assembly processing tests: BuildFailure

Html Report (VSDrops) Download

❌ monotouch tests (iOS)

1 tests failed, 18 tests passed.

Failed tests

  • monotouch-test/iOS - simulator/Release (link all): TimedOut

Html Report (VSDrops) Download

Successes

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 1 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 17 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 17 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 17 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 17 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 19 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 19 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 19 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
✅ Tests on macOS Golden Gate (27): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

✅ Linux build succeeded

Pipeline on Agent
Hash: 488e7bd937420e07a378a4ee1764b6bcba9d3ed3 [PR build]

Base automatically changed from darc-main-bb2d1efa-1945-4a7c-b403-2cf8af198005 to main November 19, 2026 07:20
Copilot AI balanced review requested due to automatic review settings November 19, 2026 13:15

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.

🟢 Approval recommended

No active review issues remain for the app-extension trimming change.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 24, 2026 10:42

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.

🟢 Approval recommended

No active review issues remain for the app-extension trimming update.

No open issues 🎉

Review effort: Balanced

@MauiBot

MauiBot commented Nov 24, 2026

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: b51a25f4d823304d15aae085a5435780f5596dac [PR build]

@MauiBot

MauiBot commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

🚀 [CI Build #b51a25f] 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
✅ 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. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 1 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 17 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 17 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 17 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 17 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 19 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 19 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 19 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 19 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
✅ Tests on macOS Golden Gate (27): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

✅ Linux build succeeded

Pipeline on Agent
Hash: b51a25f4d823304d15aae085a5435780f5596dac [PR build]

@rolfbjarne rolfbjarne added the ready-to-review This PR is ready to review/merge. label Nov 24, 2026
@rolfbjarne
rolfbjarne merged commit 0908510 into main Nov 24, 2026
56 checks passed
@rolfbjarne
rolfbjarne deleted the dev/rolf/extension-root-mode branch November 24, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[.NET 12] Fully trimmed app extension builds fail with ILLink Library roots

5 participants