Add trimming features

This commit is contained in:
JustArchi
2020-11-15 01:02:17 +01:00
parent 76818e28d7
commit f2a9d10e29

View File

@@ -28,6 +28,7 @@
<DefineConstants>$(DefineConstants);ASF_VARIANT_$(ASFVariant.Replace('-', '_').ToUpperInvariant())</DefineConstants>
</PropertyGroup>
<!-- Default configuration for release builds -->
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
@@ -35,6 +36,15 @@
<WarningsAsErrors />
</PropertyGroup>
<!-- Trimming features as specified on https://docs.microsoft.com/dotnet/core/deploying/trimming-options#trimming-framework-library-features and https://github.com/dotnet/runtime/blob/master/docs/workflow/trimming/feature-switches.md -->
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebuggerSupport>false</DebuggerSupport>
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
<EventSourceSupport>false</EventSourceSupport>
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
</PropertyGroup>
<PropertyGroup Condition="'$(OS)' == 'Windows_NT' OR '$(ASFNetFramework)' != ''">
<TargetFrameworks>net5.0;net48</TargetFrameworks>
</PropertyGroup>