We will use `AssemblyMetadataAttribute` to specify `IsTrimmable` on an assembly, instead of introducing a new attribute. The existing attribute seems well-suited for this use case, as it is already similarly used to control servicing for framework assemblies, for example via:
```csharp
-[assembly: AssemblyMetadata(".NETFrameworkAssembly", "")]
[assembly: AssemblyMetadata("Serviceable", "True")]
[assembly: AssemblyMetadata("PreferInbox", "True")]
```
<Description Condition="'$(Description)' == ''">$(AssemblyName)</Description>
</PropertyGroup>
- <!-- Assembly metadata indicating that an assembly is a framework (as opposed to user) assembly:
- Test projects need to not have this because of the way "IsFrameworkAssembly" APIs work to check this. -->
<ItemGroup Condition="'$(IsTestProject)' != 'true' and '$(IsTestSupportProject)' != 'true'">
<AssemblyAttribute Include="System.Reflection.AssemblyMetadata">
- <_Parameter1>.NETFrameworkAssembly</_Parameter1>
- <_Parameter2></_Parameter2>
- </AssemblyAttribute>
- <AssemblyAttribute Include="System.Reflection.AssemblyMetadata">
<_Parameter1>Serviceable</_Parameter1>
<_Parameter2>True</_Parameter2>
</AssemblyAttribute>
<type fullname="System.Reflection.AssemblyMetadataAttribute">
<attribute internal="RemoveAttributeInstances">
<argument type="System.Object">
- <argument>.NETFrameworkAssembly</argument>
- </argument>
- </attribute>
- </type>
- <type fullname="System.Reflection.AssemblyMetadataAttribute">
- <attribute internal="RemoveAttributeInstances">
- <argument type="System.Object">
<argument>RepositoryUrl</argument>
</argument>
</attribute>
[assembly: DefaultDllImportSearchPaths(DllImportSearchPath.AssemblyDirectory | DllImportSearchPath.System32)]
[assembly: AssemblyMetadata("Serviceable", "True")]
-[assembly: AssemblyMetadata(".NETFrameworkAssembly", "")]
[assembly: AssemblyMetadata("IsTrimmable", "True")]
[assembly: NeutralResourcesLanguage("en-US")]