Skip to content

Commit 8ca5983

Browse files
authored
DefaultRuntimeHostConfigurationOptions for WinForms trimming (#41702)
1 parent 9e47361 commit 8ca5983

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

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

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,16 @@ Copyright (c) .NET Foundation. All rights reserved.
504504
Value="$(_AggressiveAttributeTrimming)"
505505
Trim="true" />
506506

507+
<RuntimeHostConfigurationOption Include="System.ComponentModel.DefaultValueAttribute.IsSupported"
508+
Condition="'$(_DefaultValueAttributeSupport)' != ''"
509+
Value="$(_DefaultValueAttributeSupport)"
510+
Trim="true" />
511+
512+
<RuntimeHostConfigurationOption Include="System.ComponentModel.Design.IDesignerHost.IsSupported"
513+
Condition="'$(_DesignerHostSupport)' != ''"
514+
Value="$(_DesignerHostSupport)"
515+
Trim="true" />
516+
507517
<RuntimeHostConfigurationOption Include="System.ComponentModel.TypeConverter.EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization"
508518
Condition="'$(EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization)' != ''"
509519
Value="$(EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization)"
@@ -534,6 +544,11 @@ Copyright (c) .NET Foundation. All rights reserved.
534544
Value="$(EventSourceSupport)"
535545
Trim="true" />
536546

547+
<RuntimeHostConfigurationOption Include="System.Drawing.Design.UITypeEditor.IsSupported"
548+
Condition="'$(_WinFormsUITypeEditorSupport)' != ''"
549+
Value="$(_WinFormsUITypeEditorSupport)"
550+
Trim="true" />
551+
537552
<RuntimeHostConfigurationOption Include="System.GC.Concurrent"
538553
Condition="'$(ConcurrentGarbageCollection)' != ''"
539554
Value="$(ConcurrentGarbageCollection)" />
@@ -683,6 +698,41 @@ Copyright (c) .NET Foundation. All rights reserved.
683698
Value="$(UseWindowsThreadPool)"
684699
Trim="true" />
685700

701+
<RuntimeHostConfigurationOption Include="System.Windows.Forms.ActiveXImpl.IsSupported"
702+
Condition="'$(_ActiveXImplSupport)' != ''"
703+
Value="$(_ActiveXImplSupport)"
704+
Trim="true" />
705+
706+
<RuntimeHostConfigurationOption Include="System.Windows.Forms.Binding.IsSupported"
707+
Condition="'$(_WinFormsBindingSupport)' != ''"
708+
Value="$(_WinFormsBindingSupport)"
709+
Trim="true" />
710+
711+
<RuntimeHostConfigurationOption Include="System.Windows.Forms.Control.AreDesignTimeFeaturesSupported"
712+
Condition="'$(_WinFormsDesignTimeFeaturesSupport)' != ''"
713+
Value="$(_WinFormsDesignTimeFeaturesSupport)"
714+
Trim="true" />
715+
716+
<RuntimeHostConfigurationOption Include="System.Windows.Forms.Control.UseComponentModelRegisteredTypes"
717+
Condition="'$(_UseComponentModelRegisteredTypes)' != ''"
718+
Value="$(_UseComponentModelRegisteredTypes)"
719+
Trim="true" />
720+
721+
<RuntimeHostConfigurationOption Include="System.Windows.Forms.ImageIndexConverter.IsSupported"
722+
Condition="'$(_WinFormsImageIndexConverterSupport)' != ''"
723+
Value="$(_WinFormsImageIndexConverterSupport)"
724+
Trim="true" />
725+
726+
<RuntimeHostConfigurationOption Include="System.Windows.Forms.MdiWindowDialog.IsSupported"
727+
Condition="'$(_MdiWindowDialogSupport)' != ''"
728+
Value="$(_MdiWindowDialogSupport)"
729+
Trim="true" />
730+
731+
<RuntimeHostConfigurationOption Include="System.Windows.Forms.Primitives.TypeConverterHelper.UseComponentModelRegisteredTypes"
732+
Condition="'$(_UseComponentModelRegisteredTypes)' != ''"
733+
Value="$(_UseComponentModelRegisteredTypes)"
734+
Trim="true" />
735+
686736
<RuntimeHostConfigurationOption Include="System.Xml.XmlResolver.IsNetworkingEnabledByDefault"
687737
Condition="'$(XmlResolverIsNetworkingEnabledByDefault)' != ''"
688738
Value="$(XmlResolverIsNetworkingEnabledByDefault)"

0 commit comments

Comments
 (0)