Loading

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

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>
posted @ 2021-05-15 17:46  microestc  阅读(2490)  评论(1编辑  收藏  举报