Repository navigation
[dotnet] Use RootMode=Visible for app extensions. Fixes #27342 - #27355
Conversation
…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
…m dotnet/dotnet
…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
…m dotnet/dotnet
…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
…m dotnet/dotnet
…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
…m dotnet/dotnet
…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
…m dotnet/dotnet
…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
…m dotnet/dotnet
…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
…m dotnet/dotnet
…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
…m dotnet/dotnet
…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
…m dotnet/dotnet
…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
…m dotnet/dotnet
…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
…m dotnet/dotnet
…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
…m dotnet/dotnet
…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
…m dotnet/dotnet
…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
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
…2d1efa-1945-4a7c-b403-2cf8af198005
…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
…m dotnet/dotnet
Co-authored-by: Copilot App <[email protected]>
App extensions now use RootMode=Visible, which avoids the ILLink library-mode behavior that broke this test. Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
🟢 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=Visibleinstead ofLibraryfor app-extension roots, avoiding library-only behavior that disables reference-scope updates. - Re-enables
BuildTrimmedExtensionProjectregression 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
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
🔥 [CI Build #488e7bd] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 2 tests failed, 195 tests passed. Failures❌ assembly-processing tests1 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ monotouch tests (iOS)1 tests failed, 18 tests passed.Failed tests
Html Report (VSDrops) Download Successes✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Co-authored-by: Copilot App <[email protected]>
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
🚀 [CI Build #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 macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
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-awaySystem.Runtimefacade, and the managed registrar fails with MT2430/MT2431.The ILLink maintainers suggested using
RootMode=Visibleinstead (dotnet/runtime#137672 (comment)), which roots the visible API of the assembly without the library-only behavior.This also re-enables the
BuildTrimmedExtensionProjecttest, which was ignored in #27092.Fixes #27342
🤖 Pull request created by Copilot
Note
This pull request was drafted with GitHub Copilot.