Skip to content

Commit 14ef342

Browse files
authored
Add note about nativeaot (#2687)
* Add note about nativeaot. * Change to note.
1 parent dc575f4 commit 14ef342

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/deployment/trimming.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Trim a .NET MAUI app"
33
description: "Learn about the .NET trimmer, which eliminates unused code from a .NET MAUI app to reduce its size."
4-
ms.date: 12/03/2024
4+
ms.date: 12/20/2024
55
no-loc: [ ILLink ]
66
monikerRange: ">=net-maui-9.0"
77
---
@@ -35,8 +35,10 @@ The `full` trim mode removes any code that's not used by your app. The `partial`
3535

3636
This is equivalent to setting `[AssemblyMetadata("IsTrimmable", "True")]` when building the assembly.
3737

38+
In a .NET MAUI app, it's not necessary to set the `$(PublishTrimmed)` build property to `true` in your app's project file, because this is set by default.
39+
3840
> [!NOTE]
39-
> It's not necessary to set the `$(PublishTrimmed)` build property to `true` in your app's project file, because this is set by default.
41+
> Don't set the `$(TrimMode)` build property when using Native AOT deployment. Native AOT deployment automatically performs full trimming of your app. For more information, see [Native AOT deployment on iOS and Mac Catalyst](nativeaot.md).
4042
4143
For more trimming options, see [Trimming options](/dotnet/core/deploying/trimming/trimming-options).
4244

0 commit comments

Comments
 (0)