Skip to content

Commit 807cd29

Browse files
authored
linker feature System.TimeZoneInfo.Invariant (#45792)
2 parents 15f99ba + 2114dbd commit 807cd29

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

src/Containers/Microsoft.NET.Build.Containers/KnownStrings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public static class Properties
4141
public static readonly string PublishTrimmed = nameof(PublishTrimmed);
4242
public static readonly string PublishSelfContained = nameof(PublishSelfContained);
4343
public static readonly string InvariantGlobalization = nameof(InvariantGlobalization);
44+
public static readonly string InvariantTimezone = nameof(InvariantTimezone);
4445
}
4546

4647
public static class Items

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,11 @@ Copyright (c) .NET Foundation. All rights reserved.
602602
Value="$(InvariantGlobalization)"
603603
Trim="true" />
604604

605+
<RuntimeHostConfigurationOption Include="System.TimeZoneInfo.Invariant"
606+
Condition="'$(InvariantTimezone)' != ''"
607+
Value="$(InvariantTimezone)"
608+
Trim="true" />
609+
605610
<RuntimeHostConfigurationOption Include="System.Globalization.Hybrid"
606611
Condition="'$(HybridGlobalization)' != ''"
607612
Value="$(HybridGlobalization)"

test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAProjectWithAllFeatures.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public void It_publishes_the_project_correctly(string targetFramework, string[]
7171
""System.Diagnostics.Tracing.EventSource.IsSupported"": false,
7272
""System.Drawing.Design.UITypeEditor.IsSupported"": true,
7373
""System.Globalization.Invariant"": true,
74+
""System.TimeZoneInfo.Invariant"": true,
7475
""System.Globalization.PredefinedCulturesOnly"": true,
7576
""System.GC.Concurrent"": false,
7677
""System.GC.Server"": true,

test/TestAssets/TestProjects/KitchenSink/TestApp/TestApp.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<EventSourceSupport>false</EventSourceSupport>
2323
<_WinFormsUITypeEditorSupport>true</_WinFormsUITypeEditorSupport>
2424
<InvariantGlobalization>true</InvariantGlobalization>
25+
<InvariantTimezone>true</InvariantTimezone>
2526
<PredefinedCulturesOnly>true</PredefinedCulturesOnly>
2627
<ConcurrentGarbageCollection>false</ConcurrentGarbageCollection>
2728
<ServerGarbageCollection>true</ServerGarbageCollection>

0 commit comments

Comments
 (0)