You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Note we are making use of the `PublishAot` option. Using `Aot` has some restrictions which may require changes to your game code. Especially if you are using Reflection.
20
+
18
21
You can then zip the content of the publish folder and distribute the archive as-is.
19
22
20
23
If you are targeting WindowsDX, note that players will need [the DirectX June 2010 runtime](https://www.microsoft.com/en-us/download/details.aspx?id=8109) to be installed on their machine for audio and gamepads to work properly.
Note we are making use of the `PublishAot` option. Using `Aot` has some restrictions which may require changes to your game code.
52
-
Especially if you are using Reflection.
54
+
> [!IMPORTANT]
55
+
> Note we are making use of the `PublishAot` option. Using `Aot` has some restrictions which may require changes to your game code. Especially if you are using Reflection.
53
56
54
57
Next we need to comibne the two binaries into one Universal Binary which will work on both arm64 and x64 machines.
> Note we are making use of the `PublishAot` option. Using `Aot` has some restrictions which may require changes to your game code. Especially if you are using Reflection.
149
+
144
150
You can then archive the content of the publish folder and distribute the archive as-is.
145
151
146
152
We recommend using the .tar.gz archiving format to preserve the execution permissions.
@@ -164,16 +170,18 @@ However you do need to currently add some additional settings to your .csproj.
164
170
```
165
171
166
172
The `TrimmerRootAssembly` stops the trimmer removing code from these assemblies. This will on the whole allow the game to run without
167
-
any issues. However if you are using any Third Party or additional assemblies, you might need to add them to this list.
168
-
For MacOS it is recommended that you publish using AOT as it simplifies the app bundle.
173
+
any issues. However if you are using any Third Party or additional assemblies, you might need to add them to this list or fix your code to be `Aot` compliant.
174
+
It is recommended that you publish using AOT as it simplifies the app bundle.
169
175
170
176
See [Trim self-contained deployments and executables](https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trim-self-contained) for more information.
171
177
172
-
There are some known area's yoo need to watchout for.
178
+
There are some known area's you need to watchout for.
173
179
174
180
1. Using `XmlSerializer` in your game will probably cause issues. Since it uses reflection it will be difficult for the Trimmer to figure out what needs to be kept.
175
181
It is recommended that instead of using the `Deserialize` method, you write your own custom deserializer using `XDocument` or `XmlReader`.
176
-
Alternatively you can use the Content Pipeline and create a custom `Processor` and `Reader` to convert the Xml into a binary format that can be loaded via the usual `Content.Load<T>` method.
182
+
Alternatively you can use the Content Pipeline and create a custom `Processor` and `Reader` to convert the Xml into a binary format that can be loaded via the usual `Content.Load<T>` method.
183
+
2. Dynamically loading assemblies via `Assembly.LoadFile`.
184
+
3. No run-time code generation, for example, System.Reflection.Emit.
0 commit comments