I did some more reasearch, it appears to be a problem with .NET Core 3.1
which has a limitation of max ICU version it can use, which is 70
.
End of Support
for .NET Core 3.1
is December 13, 2022, in about 6 months so they are not going to support icu 71
.
The project I’m working on is mostly .NET 6.0
but it still has some 3.1
code inside it.
For the .NET 6.0
i narrowed down the problem to Microsoft.NET.Sdk.Functions
package:
Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(37, 5): Metadata generation failed. Exit code: '134' Error: 'Process terminated. Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support. at System.Environment.FailFast(System.String) at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode() at System.Globalization.GlobalizationMode..cctor() at System.Globalization.CultureData.CreateCultureWithInvariantData() at System.Globalization.CultureData.get_Invariant() at System.Globalization.CultureInfo..cctor() at System.String.ToLowerInvariant() at System.IO.PathInternal.GetIsCaseSensitive() at System.IO.PathInternal..cctor() at System.IO.Enumeration.FileSystemEnumerableFactory.MatchesPattern(System.String, System.ReadOnlySpan`1<Char>, System.IO.EnumerationOptions) at System.IO.Enumeration.FileSystemEnumerableFactory+<>c__DisplayClass3_0.<UserFiles>b__1(System.IO.Enumeration.FileSystemEntry ByRef) at System.IO.Enumeration.FileSystemEnumerable`1+DelegateEnumerator[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ShouldIncludeEntry(System.IO.Enumeration.FileSystemEntry ByRef) at System.IO.Enumeration.FileSystemEnumerator`1[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext() at System.Linq.Enumerable+WhereEnumerableIterator`1[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray() at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>) at ExtensionsMetadataGenerator.ExtensionsMetadataGenerator.Generate(System.String, System.String, ExtensionsMetadataGenerator.ConsoleLogger) at ExtensionsMetadataGenerator.Console.Program.Main(System.String[])'
The strange thing about this error is that System.Globalization.GlobalizationMode.GetGlobalizationInvariantMod
method doesn’t exist in .NET 6.0
anymore
@linux-aarhus
Since you already have the environmen setup, would you mind running a sample .NET 6.0
project that references Microsoft.NET.Sdk.Functions
and seeing if you get the same error?
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.1" />
</ItemGroup>
</Project>
dotnet --info
.NET SDK (reflecting any global.json):
Version: 6.0.301
Commit: 43f9b18481
Runtime Environment:
OS Name: manjaro
OS Version:
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/6.0.301/
Host (useful for support):
Version: 6.0.6
Commit: 7cca709db2
.NET SDKs installed:
3.1.414 [/usr/share/dotnet/sdk]
6.0.301 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.20 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download