オラ。なんだかわからないけど自分用のメモ


■csproj
 下記をcsprojに設定する

 ⇒理由 CentOS6のサポートは3.1.11までだから

 <RuntimeFrameworkVersion>3.1.11</RuntimeFrameworkVersion>

■ビルドコマンド
 dotnet publish -c Linux-Release --self-contained true -r rhel.6-x64 /p:PublishSingleFile=true

 ⇒理由 CentOS6のサポートは3.1.11。当時はlinux-x64ではなく"rhel.6-x64"
     注意:WinPCでビルドできる!けどnugetできる環境にあること

■メモ
 ・実行時にICUなんとかってエラーが出る場合。下記の2方法を選択

  csprojに下記を追加する
    <ItemGroup>
      <RuntimeHostConfigurationOption Include="System.Globalization.Invariant" Value="true" />
    </ItemGroup> 

  下記URLの対応
    https://github.com/dotnet/core/blob/main/Documentation/build-and-install-rhel6-prerequisites.md
 

結局他人に頼むより自分で調べてやった方が早いわ。アディオス