Enable full trimming

Fix trim errors by excluding full assemblies from trimming that use reflection

Co-authored-by: Aaron Robinson <aaronrobin1234@gmail.com>
This commit is contained in:
KeatonTheBot
2025-12-19 17:49:03 -06:00
co-authored by Aaron Robinson
parent 812cecd713
commit ad516777d9
2 changed files with 12 additions and 12 deletions
+3 -12
View File
@@ -21,18 +21,6 @@
<PublishSingleFile>true</PublishSingleFile>
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<PublishTrimmed>true</PublishTrimmed>
<PublishTrimmed Condition="'$(RuntimeIdentifier)' == 'win-arm64'">false</PublishTrimmed>
<TrimMode>partial</TrimMode>
</PropertyGroup>
<!--
FluentAvalonia, used in the Avalonia UI, requires a workaround for the json serializer used internally when using .NET 8+ System.Text.Json.
See:
https://github.com/amwx/FluentAvalonia/issues/481
https://devblogs.microsoft.com/dotnet/system-text-json-in-dotnet-8/
-->
<PropertyGroup>
<JsonSerializerIsReflectionEnabledByDefault>true</JsonSerializerIsReflectionEnabledByDefault>
</PropertyGroup>
<ItemGroup>
@@ -168,4 +156,7 @@
<ItemGroup>
<AdditionalFiles Include="Assets\Locales\en_US.json" />
</ItemGroup>
<ItemGroup>
<TrimmerRootDescriptor Include="TrimmerRootDescriptor.xml" />
</ItemGroup>
</Project>
+9
View File
@@ -0,0 +1,9 @@
<linker>
<assembly fullname="Ryujinx">
<type fullname="Ryujinx.Ava.UI.Views.User*" preserve="all"/>
</assembly>
<assembly fullname="Ryujinx.HLE">
<type fullname="Ryujinx.HLE.HOS.Services*" preserve="all"/>
</assembly>
<assembly fullname="DiscordRPC" preserve="all" />
</linker>