Skip to content

Commit cf410ab

Browse files
author
Paul Johnson
authored
Attempt to make app local icu setup less problematic. (#11961)
* Attempt to make app local icu setup less problematic. Prevents issues for windows build agent -> linux app server. On Windows version is split at first '.' e.g. 68.2.0.9 -> icuuc68.dll https://github.com/dotnet/runtime/blob/205f70e/src/libraries/System.Private.CoreLib/src/System/Globalization/GlobalizationMode.Windows.cs On Linux we are looking for libicuuc.so.68.2.0.9 https://github.com/dotnet/runtime/blob/205f70e/src/libraries/System.Private.CoreLib/src/System/Globalization/GlobalizationMode.Unix.cs On macos we don't have a native library in a shiny nuget package so hope folks are building on their macs or setting the rid until we have a better solution. * Combine elements
1 parent b63aa4b commit cf410ab

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

build/templates/UmbracoProject/UmbracoProject.csproj

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@
1212
</ItemGroup>
1313

1414
<!-- Force windows to use ICU. Otherwise Windows 10 2019H1+ will do it, but older windows 10 and most if not all winodws servers will run NLS -->
15-
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
16-
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="68.2.0.9" />
17-
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="68.2" />
15+
<ItemGroup>
16+
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="68.2.0.9" />
17+
18+
<RuntimeHostConfigurationOption
19+
Condition="$(RuntimeIdentifier.StartsWith('linux')) Or $(RuntimeIdentifier.StartsWith('win')) Or ('$(RuntimeIdentifier)' == '' And !$([MSBuild]::IsOSPlatform('osx')))"
20+
Include="System.Globalization.AppLocalIcu"
21+
Value="68.2.0.9" />
1822
</ItemGroup>
1923

2024
<Import Project="..\PackageTestSiteName\build\PackageTestSiteName.targets" Condition="'$(PackageTestSiteName)' != ''" />

src/Umbraco.Web.UI/Umbraco.Web.UI.csproj

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@
1919
</ItemGroup>
2020

2121

22+
<ItemGroup>
23+
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="68.2.0.9" />
24+
25+
<RuntimeHostConfigurationOption
26+
Condition="$(RuntimeIdentifier.StartsWith('linux')) Or $(RuntimeIdentifier.StartsWith('win')) Or ('$(RuntimeIdentifier)' == '' And !$([MSBuild]::IsOSPlatform('osx')))"
27+
Include="System.Globalization.AppLocalIcu"
28+
Value="68.2.0.9" />
29+
</ItemGroup>
30+
2231
<ItemGroup>
2332
<Folder Include="App_Plugins" />
2433
<Folder Include="Views" />
@@ -92,7 +101,7 @@
92101
<Message Text="-CheckPreconditions-" Importance="high" />
93102
<Message Text="JsonSchemaPath: $(JsonSchemaPath)" Importance="high" />
94103
<Message Text="BellePath: $(BellePath)" Importance="high" />
95-
104+
96105
<!-- Build Belle, if building is Visual Studio and the build folder does not exist yet -->
97106
<Message Text="Skip Belle because UmbracoBuild is '$(UmbracoBuild)' (this is not Visual Studio)." Importance="High" Condition="'$(UmbracoBuild)' != ''" />
98107
<Message Text="Skip Belle because $(BellePath) exists." Importance="High" Condition="Exists('$(BellePath)')" />

0 commit comments

Comments
 (0)