Skip to content

Commit 1138b24

Browse files
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 <jkotas@microsoft.com>
1 parent 76020ae commit 1138b24

File tree

4 files changed

+0
-15
lines changed

4 files changed

+0
-15
lines changed

docs/design/tools/illink/trimmed-assemblies.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ If there is a use case for specifying trimmable assemblies on the command-line,
182182
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:
183183

184184
```csharp
185-
[assembly: AssemblyMetadata(".NETFrameworkAssembly", "")]
186185
[assembly: AssemblyMetadata("Serviceable", "True")]
187186
[assembly: AssemblyMetadata("PreferInbox", "True")]
188187
```

eng/versioning.targets

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,7 @@
88
<Description Condition="'$(Description)' == ''">$(AssemblyName)</Description>
99
</PropertyGroup>
1010

11-
<!-- Assembly metadata indicating that an assembly is a framework (as opposed to user) assembly:
12-
Test projects need to not have this because of the way "IsFrameworkAssembly" APIs work to check this. -->
1311
<ItemGroup Condition="'$(IsTestProject)' != 'true' and '$(IsTestSupportProject)' != 'true'">
14-
<AssemblyAttribute Include="System.Reflection.AssemblyMetadata">
15-
<_Parameter1>.NETFrameworkAssembly</_Parameter1>
16-
<_Parameter2></_Parameter2>
17-
</AssemblyAttribute>
1812
<AssemblyAttribute Include="System.Reflection.AssemblyMetadata">
1913
<_Parameter1>Serviceable</_Parameter1>
2014
<_Parameter2>True</_Parameter2>

src/libraries/System.Private.CoreLib/src/ILLink/ILLink.LinkAttributes.Shared.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -344,13 +344,6 @@
344344
</argument>
345345
</attribute>
346346
</type>
347-
<type fullname="System.Reflection.AssemblyMetadataAttribute">
348-
<attribute internal="RemoveAttributeInstances">
349-
<argument type="System.Object">
350-
<argument>.NETFrameworkAssembly</argument>
351-
</argument>
352-
</attribute>
353-
</type>
354347
<type fullname="System.Reflection.AssemblyMetadataAttribute">
355348
<attribute internal="RemoveAttributeInstances">
356349
<argument type="System.Object">

src/libraries/System.Private.CoreLib/src/Internal/AssemblyAttributes.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
[assembly: DefaultDllImportSearchPaths(DllImportSearchPath.AssemblyDirectory | DllImportSearchPath.System32)]
1313

1414
[assembly: AssemblyMetadata("Serviceable", "True")]
15-
[assembly: AssemblyMetadata(".NETFrameworkAssembly", "")]
1615
[assembly: AssemblyMetadata("IsTrimmable", "True")]
1716

1817
[assembly: NeutralResourcesLanguage("en-US")]

0 commit comments

Comments
 (0)