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.

DOTNET CORE "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."

解决方案(官方)https://github.com/dotnet/core/blob/main/Documentation/build-and-install-rhel6-prerequisites.md

1. 最简单操作 添加一个环境变量

$ export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1

然后直接运行可执行文件

2. 面向开发人员的方式 在 runtimeconfig.json 配置文件中

加入

{
    "runtimeOptions": {
        "configProperties": {
            "System.Globalization.Invariant": true
        },
    }
}

3. 在项目的配置文件中 .csproj 文件中加入 msbuild 配置

  <PropertyGroup>
    <InvariantGlobalization>true</InvariantGlobalization>
  </PropertyGroup>

相关文章:

  • 2021-10-08
  • 2021-09-28
  • 2021-12-27
  • 2022-12-23
  • 2021-06-26
  • 2021-09-29
  • 2022-02-26
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案