Skip to content

TrimOOBAssemblies target shouldn't hardcode untrimmable assemblies #72166

@ViktorHofer

Description

@ViktorHofer

The TrimOOBAssemblies's dependent target currently hardcodes the list of untrimmable out-of-band assemblies:

<!-- The following is the list of all the OOBs we will ignore for now -->
<OOBAssemblyToIgnore Include="System.CodeDom;
System.ComponentModel.Composition;
System.ComponentModel.Composition.Registration;
System.Composition.AttributedModel;
System.Composition.Convention;
System.Composition.Hosting;
System.Composition.Runtime;
System.Composition.TypedParts;
System.Configuration.ConfigurationManager;
System.Speech;
Microsoft.Extensions.DependencyInjection.Specification.Tests" />

This information is already provided by the projects themselves and should just be accessed by flowing it through the TargetPathWithTargetPlatformMoniker item. That static data isn't up-to-date already as System.ComponentModel.AttributedModel and System.Composition.Runtime are trimmable but were excluded from the validation.

Noticed this in https://github.com/dotnet/runtime/pull/71752/files#diff-c45d29e8d7bee20b15b64ce806983857a3e5899cbedc412e71cce4bd83a70323R58 which sets <IsTrimmable>false</IsTrimmable> in the project's body but also in the oob.proj file.

cc @eerhardt @joperezr @ericstj

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions