Skip to content

Remove _RemoveAppAssemblyFromTrimmerRoots workaround once SDK contains dotnet/runtime#125673 #11146

Description

@simonrozsival

src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.TypeMap.Trimmable.CoreCLR.targets contains a temporary _RemoveAppAssemblyFromTrimmerRoots target (added in #11144) that removes @(IntermediateAssembly) from @(TrimmerRootAssembly) to avoid IL1034 during trimmable typemap builds.

The upstream fix in dotnet/runtime#125673 makes this unnecessary: once the consumed .NET SDK's Microsoft.NET.ILLink.targets contains the '$(OutputType)' != 'Library' condition on the TrimmerRootAssembly Include, the item is never added for Android projects (which force OutputType=Library) in the first place.

Action items

  1. Verify the SDK flow-in has landed (check Microsoft.NET.ILLink.targets in the bundled SDK for the new condition).
  2. Delete the _RemoveAppAssemblyFromTrimmerRoots target and its comment from Microsoft.Android.Sdk.TypeMap.Trimmable.CoreCLR.targets.
  3. Run tests/Microsoft.Android.Sdk.TrimmableTypeMap.Tests and a CoreCLRTrimmable Mono.Android.NET-Tests device run to confirm trimming still works without the workaround.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageIssues that need to be assigned.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions