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
2026-02-03 23:53:53 -06:00
co-authored by Aaron Robinson
parent 1b2d471039
commit d3a6d02ca1
2 changed files with 12 additions and 15 deletions
+3 -15
View File
@@ -29,21 +29,6 @@
<SelfContained>true</SelfContained>
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>partial</TrimMode>
</PropertyGroup>
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'win-arm64'">
<PublishTrimmed>false</PublishTrimmed>
</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>
@@ -179,4 +164,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.HLE">
<type fullname="Ryujinx.HLE.HOS.Services*" preserve="all"/>
</assembly>
<assembly fullname="System.Management">
<type fullname="System.Management.MTAHelper*" preserve="all"/>
<type fullname="System.Management.WmiNetUtilsHelper*" preserve="all"/>
</assembly>
</linker>