From 122621186eb247773c939c64a14e082b866b24a4 Mon Sep 17 00:00:00 2001 From: Thomas Altenburger Date: Thu, 27 Mar 2025 11:25:52 +0100 Subject: [PATCH] WindowsDX note about AOT support --- articles/getting_started/packaging_games.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/articles/getting_started/packaging_games.md b/articles/getting_started/packaging_games.md index d37a2e5b..0a374667 100644 --- a/articles/getting_started/packaging_games.md +++ b/articles/getting_started/packaging_games.md @@ -153,6 +153,10 @@ We recommend using the `.tar.gz` archiving format to preserve the execution perm ### PublishAot and PublishTrimmed +> [!IMPORTANT] +> The WindowsDX target is not compatible with ```PublishAot``` or ```PublishTrimmed``` because it uses Windows Forms, which is (as of .NET 9) not compatible with these options. If you need trimming or AOT compilation for desktop platforms, please consider using the DesktopGL target instead of WindowsDX. + + The ```PublishAot``` option optimises your game code "Ahead of Time" for performance. It allows you to ship your game without the need to JIT (Just In Time compile), and will basically natively compile your game. ```PublishAot``` binaries are much faster, which is typically desired for games. It however comes with limitations, like the inability to use runtime reflection and runtime code generation (IL emition).