From 1138b247eca270835a53ff14fbcc04b4e9b263fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Thu, 27 Jul 2023 23:55:19 +0900 Subject: [PATCH] Remove `AssemblyMetadata(".NETFrameworkAssembly", "")` attributes (#89490) * Remove `AssemblyMetadata(".NETFrameworkAssembly", "")` attributes This is likely a .NET Native leftover that is currently (ironically) breaking .NET Native. This attribute indicates to the .NET Native compiler that the assembly can be trimmed. We're currently setting this on assemblies that no longer carry RD.XML to make this safe. Without this attribute, the assembly will be treated like any other and not trimmed. Fixes #44697. * Delete mention of the attribute in docs Co-authored-by: Jan Kotas --- docs/design/tools/illink/trimmed-assemblies.md | 1 - eng/versioning.targets | 6 ------ .../src/ILLink/ILLink.LinkAttributes.Shared.xml | 7 ------- .../src/Internal/AssemblyAttributes.cs | 1 - 4 files changed, 15 deletions(-) diff --git a/docs/design/tools/illink/trimmed-assemblies.md b/docs/design/tools/illink/trimmed-assemblies.md index 007d24a33129bf..bf2b9273d4fc50 100644 --- a/docs/design/tools/illink/trimmed-assemblies.md +++ b/docs/design/tools/illink/trimmed-assemblies.md @@ -182,7 +182,6 @@ If there is a use case for specifying trimmable assemblies on the command-line, 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")] ``` diff --git a/eng/versioning.targets b/eng/versioning.targets index 7746e94594a979..72678ee1992365 100644 --- a/eng/versioning.targets +++ b/eng/versioning.targets @@ -8,13 +8,7 @@ $(AssemblyName) - - - <_Parameter1>.NETFrameworkAssembly - <_Parameter2> - <_Parameter1>Serviceable <_Parameter2>True diff --git a/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.LinkAttributes.Shared.xml b/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.LinkAttributes.Shared.xml index b3f72c0a125026..adbcd6f00ee499 100644 --- a/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.LinkAttributes.Shared.xml +++ b/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.LinkAttributes.Shared.xml @@ -344,13 +344,6 @@ - - - - .NETFrameworkAssembly - - - diff --git a/src/libraries/System.Private.CoreLib/src/Internal/AssemblyAttributes.cs b/src/libraries/System.Private.CoreLib/src/Internal/AssemblyAttributes.cs index 2d36d0fbbc3301..280925881c40d4 100644 --- a/src/libraries/System.Private.CoreLib/src/Internal/AssemblyAttributes.cs +++ b/src/libraries/System.Private.CoreLib/src/Internal/AssemblyAttributes.cs @@ -12,7 +12,6 @@ [assembly: DefaultDllImportSearchPaths(DllImportSearchPath.AssemblyDirectory | DllImportSearchPath.System32)] [assembly: AssemblyMetadata("Serviceable", "True")] -[assembly: AssemblyMetadata(".NETFrameworkAssembly", "")] [assembly: AssemblyMetadata("IsTrimmable", "True")] [assembly: NeutralResourcesLanguage("en-US")]