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
This commit is contained in:
Paul Johnson
2022-02-10 12:03:35 +00:00
committed by GitHub
parent b63aa4b19c
commit cf410ab91e
2 changed files with 17 additions and 4 deletions

View File

@@ -19,6 +19,15 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="68.2.0.9" />
<RuntimeHostConfigurationOption
Condition="$(RuntimeIdentifier.StartsWith('linux')) Or $(RuntimeIdentifier.StartsWith('win')) Or ('$(RuntimeIdentifier)' == '' And !$([MSBuild]::IsOSPlatform('osx')))"
Include="System.Globalization.AppLocalIcu"
Value="68.2.0.9" />
</ItemGroup>
<ItemGroup>
<Folder Include="App_Plugins" />
<Folder Include="Views" />
@@ -92,7 +101,7 @@
<Message Text="-CheckPreconditions-" Importance="high" />
<Message Text="JsonSchemaPath: $(JsonSchemaPath)" Importance="high" />
<Message Text="BellePath: $(BellePath)" Importance="high" />
<!-- Build Belle, if building is Visual Studio and the build folder does not exist yet -->
<Message Text="Skip Belle because UmbracoBuild is '$(UmbracoBuild)' (this is not Visual Studio)." Importance="High" Condition="'$(UmbracoBuild)' != ''" />
<Message Text="Skip Belle because $(BellePath) exists." Importance="High" Condition="Exists('$(BellePath)')" />