Skip to content

Commit e39c153

Browse files
committed
FB
1 parent 2d3ed5b commit e39c153

File tree

1 file changed

+11
-53
lines changed

1 file changed

+11
-53
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILLink.targets

Lines changed: 11 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -27,61 +27,19 @@ 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>
39-
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
51-
$([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '6.0'))">
52-
<EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization>false</EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization>
53-
</PropertyGroup>
54-
55-
<!-- We disable in-built COM Interop support for trimmed apps here so that the feature
56-
switch can flow to the runtimeconfig.json. Built-in COM Interop 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="'$(BuiltInComInteropSupport)' == '' And
60-
'$(PublishTrimmed)' == 'true' And
61-
$([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '6.0'))">
62-
<BuiltInComInteropSupport>false</BuiltInComInteropSupport>
63-
</PropertyGroup>
64-
65-
<!-- We disable Native Host entry point support for IJW (C++/CLI Assemblies) for trimmed
66-
apps here so that the feature switch can flow to the runtimeconfig.json.
67-
Native Host entry point support is disabled
68-
by default since they may require assemblies, types or members that
69-
could be removed by the linker, causing a trimmed app to crash. -->
70-
<PropertyGroup Condition="'$(EnableCPlusPlusCLIHostActivation)' == '' And
71-
'$(PublishTrimmed)' == 'true' And
72-
$([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '6.0'))">
73-
<EnableCPlusPlusCLIHostActivation>false</EnableCPlusPlusCLIHostActivation>
74-
</PropertyGroup>
7530

76-
<!-- We disable Native Host entry point support for loading managed components for trimmed
77-
apps here so that the feature switch can flow to the runtimeconfig.json.
78-
Native Host entry point support is disabled
79-
by default since they may require assemblies, types or members that
80-
could be removed by the linker, causing a trimmed app to crash. -->
81-
<PropertyGroup Condition="'$(_EnableCallingManagedFunctionFromNativeHosting)' == '' And
82-
'$(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
8336
$([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '6.0'))">
84-
<_EnableCallingManagedFunctionFromNativeHosting>false</_EnableCallingManagedFunctionFromNativeHosting>
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+
<EnableCPlusPlusCLIHostActivation Condition="'$(EnableCPlusPlusCLIHostActivation)' == ''">false</EnableCPlusPlusCLIHostActivation>
42+
<_EnableCallingManagedFunctionFromNativeHosting Condition="'$(_EnableCallingManagedFunctionFromNativeHosting)' == ''">false</_EnableCallingManagedFunctionFromNativeHosting>
8543
</PropertyGroup>
8644

8745
<PropertyGroup Condition="'$(SuppressTrimAnalysisWarnings)' == '' And ('$(EnableTrimAnalyzer)' == 'true' Or '$(PublishTrimmed)' == 'true')">

0 commit comments

Comments
 (0)