Skip to content

Commit

Permalink
linker-control: IsAotCompatible implies IsTrimmable.
Browse files Browse the repository at this point in the history
Copied the text from prepare-libraries-for-trimming.md that provides guidance for when IsAotCompatible is true.
  • Loading branch information
breyed authored Nov 25, 2024
1 parent 6f9e019 commit a645eca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/includes/linker-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ If you have a library in your project, or you're a developer of a reusable libra

This marks your assembly as "trimmable" and enables trim warnings for that project. Being "trimmable" means your assembly is considered compatible with trimming and should have no trim warnings when the assembly is built. When used in a trimmed app, the assembly's unused members are removed in the final output.

The `IsTrimmable` property defaults to `true` when configuring a project as AOT-compatible with `<IsAotCompatible>true</IsAotCompatible>`. For more information, see [AOT-compatibility analyzers](../deploying/native-aot/index.md#aot-compatibility-analyzers).

Setting the `IsTrimmable` MSBuild property to `true` in your project file inserts the [`AssemblyMetadata`](xref:System.Reflection.AssemblyMetadataAttribute) attribute into your assembly:

```csharp
Expand Down

0 comments on commit a645eca

Please sign in to comment.