@@ -27,41 +27,21 @@ Copyright (c) .NET Foundation. All rights reserved.
2727 </AssemblyAttribute >
2828 </ItemGroup >
2929
30- <!-- We disable startup hooks for trimmed apps here so that the feature
31- switch can flow to the runtimeconfig.json. Startup hooks are disabled
32- by default since they may require assemblies, types or members that
33- could be removed by the linker, causing a trimmed app to crash. -->
34- <PropertyGroup Condition =" '$(StartupHookSupport)' == '' And
35- '$(PublishTrimmed)' == 'true' And
36- $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '6.0'))" >
37- <StartupHookSupport >false</StartupHookSupport >
38- </PropertyGroup >
3930
40- <!-- We disable custom resource types for trimmed apps here so that the feature
41- switch can flow to the runtimeconfig.json. Custom resource types are disabled
42- by default since they may require assemblies, types or members that
43- could be removed by the linker, causing a trimmed app to crash. -->
44- <PropertyGroup Condition =" '$(CustomResourceTypesSupport)' == '' And
45- '$(PublishTrimmed)' == 'true' And
46- $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '6.0'))" >
47- <CustomResourceTypesSupport >false</CustomResourceTypesSupport >
48- </PropertyGroup >
49- <PropertyGroup Condition =" '$(EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization)' == '' And
50- '$(PublishTrimmed)' == 'true' And
31+ <!-- We disable features for trimmed apps here so that the feature
32+ switches can flow to the runtimeconfig.json. Features are disabled
33+ by default since they may require assemblies, types or members that
34+ could be removed by the linker, causing a trimmed app to crash. -->
35+ <PropertyGroup Condition =" '$(PublishTrimmed)' == 'true' And
5136 $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '6.0'))" >
52- <EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization >false</EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization >
37+ <StartupHookSupport Condition =" '$(StartupHookSupport)' == ''" >false</StartupHookSupport >
38+ <CustomResourceTypesSupport Condition =" '$(CustomResourceTypesSupport)' == ''" >false</CustomResourceTypesSupport >
39+ <EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization Condition =" '$(EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization)' == ''" >false</EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization >
40+ <BuiltInComInteropSupport Condition =" '$(BuiltInComInteropSupport)' == ''" >false</BuiltInComInteropSupport >
41+ <EnableCppCLIHostActivation Condition =" '$(EnableCppCLIHostActivation)' == ''" >false</EnableCppCLIHostActivation >
42+ <_EnableConsumingManagedCodeFromNativeHosting Condition =" '$(_EnableConsumingManagedCodeFromNativeHosting)' == ''" >false</_EnableConsumingManagedCodeFromNativeHosting >
5343 </PropertyGroup >
5444
55- <!-- We disable in-built COM support for trimmed apps here so that the feature
56- switch can flow to the runtimeconfig.json. Built-in COM support is disabled
57- by default since they may require assemblies, types or members that
58- could be removed by the linker, causing a trimmed app to crash. -->
59- <PropertyGroup Condition =" '$(BuiltInComSupport)' == '' And
60- '$(PublishTrimmed)' == 'true' And
61- $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '6.0'))" >
62- <BuiltInComSupport >false</BuiltInComSupport >
63- </PropertyGroup >
64-
6545 <PropertyGroup Condition =" '$(SuppressTrimAnalysisWarnings)' == '' And ('$(EnableTrimAnalyzer)' == 'true' Or '$(PublishTrimmed)' == 'true')" >
6646 <!-- Trim analysis warnings are suppressed for .NET < 6. -->
6747 <SuppressTrimAnalysisWarnings Condition =" $([MSBuild]::VersionLessThan('$(TargetFrameworkVersion)', '6.0'))" >true</SuppressTrimAnalysisWarnings >
0 commit comments