[TrimmableTypeMap] Package CoreCLR preserve list in SDK pack#11142
Open
simonrozsival wants to merge 1 commit intomainfrom
Open
[TrimmableTypeMap] Package CoreCLR preserve list in SDK pack#11142simonrozsival wants to merge 1 commit intomainfrom
simonrozsival wants to merge 1 commit intomainfrom
Conversation
The trimmable typemap's CoreCLR preserve list (Trimmable.CoreCLR.xml) was
not reliably packaged in the Microsoft.Android.Sdk pack. It lived in
src/Microsoft.Android.Sdk.ILLink/PreserveLists/ but was only visible to
the ILLink project — the Sdk pack picked files from
src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/PreserveLists/.
Changes:
* build-tools/create-packs/Microsoft.Android.Sdk.proj: include
src/Microsoft.Android.Sdk.ILLink/PreserveLists/**.
* src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj:
link the SDK-local PreserveLists into the project's output so local
inner-builds see the same files as the CI SDK pack.
* Add TrimmableTypeMap_PreserveList_IsPackagedInSdk regression test
asserting Trimmable.CoreCLR.xml is present in the preview SDK pack.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Apr 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes SDK pack contents so the trimmable typemap’s CoreCLR trimmer descriptor is consistently available both in CI-produced packs and local inner builds of the SDK pack.
Changes:
- Package
src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/PreserveLists/**into theMicrosoft.Android.Sdk.*pack underPreserveLists/. - Copy/link SDK-local
PreserveLists/*.xmlintoMicrosoft.Android.Sdk.ILLinkoutput so local inner builds match pack contents. - Add a regression test asserting
PreserveLists/Trimmable.CoreCLR.xmlexists in the preview SDK pack.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/TrimmableTypeMapBuildTests.cs | Adds regression test validating Trimmable.CoreCLR.xml is present in the SDK pack. |
| src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj | Copies SDK PreserveLists XMLs into the local pack output layout for inner builds. |
| build-tools/create-packs/Microsoft.Android.Sdk.proj | Ensures SDK PreserveLists are included in the generated SDK pack. |
This was referenced Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1 of the split of #11091
Problem
The trimmable typemap's CoreCLR preserve list (
Trimmable.CoreCLR.xml) was not reliably packaged in theMicrosoft.Android.Sdkpack. The file lives insrc/Microsoft.Android.Sdk.ILLink/PreserveLists/but the SDK-pack glob only reachedsrc/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/PreserveLists/. Local inner builds also saw a different file set than CI.Fix
build-tools/create-packs/Microsoft.Android.Sdk.proj: includesrc/Microsoft.Android.Sdk.ILLink/PreserveLists/**in the pack.src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj: link the SDK-local PreserveLists into the project output so local inner builds see the same files as the CI SDK pack.TrimmableTypeMap_PreserveList_IsPackagedInSdkregression test that assertsTrimmable.CoreCLR.xmlis present in the preview SDK pack.Scope
Pure packaging fix — 3 files, 14 insertions.