Just to prefix this with the fact that I have no Linux experience.
I have a .NET WebAPI that I publish to two local folder locations:
- Windows
- Configuration = Release
- Target Framework = netcoreapp3.1 (I know, it's out of support)
- Deployment Mode: Self-contained
- Target Runtime : win-x64
- Linux
- Configuration = Release
- Target Framework = netcoreapp3.1 (I know, it's out of support)
- Deployment Mode: Self-contained
- Target Runtime : linux-x64
I first create a Windows App Service (I'm familiar with these) and drop the first set of files into the wwwroot folder and everything works fine.
I then create a Linux App Service, and drop the second set of files into the wwwroot folder and it fails to start.
Going to the "Diagnose and solve problems" pane for the App Service I see it finds my start-up DLL but then says:
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.
I download the full logs and the logs are all named "docker", but I'm not using a Docker container, so slightly mystified from the get-go.
If I go to the App Service's Advanced Tools and look at the Environment, I see it's using Unix 5.15.131.1 and is 64 bit.
Not sure how to proceed...
UPDATE
This is the csproj file, minus project references to other projects in the Solution.
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyVersion>1.0.0.1</AssemblyVersion>
<FileVersion>1.0.0.1</FileVersion>
<UserSecretsId>e593907e-90b3-4395-9cbc-5010001eb07c</UserSecretsId>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<TypeScriptBuildMode>true</TypeScriptBuildMode>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<!--<InvariantGlobalization>true</InvariantGlobalization>-->
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="3.1.11" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="3.1.11" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="3.1.11" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="3.1.29" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="3.1.29" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Identity.Web" Version="1.5.1" />
<PackageReference Include="Microsoft.Identity.Web.MicrosoftGraph" Version="1.5.1" />
<PackageReference Include="Microsoft.Identity.Web.UI" Version="1.5.1" />
<PackageReference Include="Microsoft.Owin.Cors" Version="3.1.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.9" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.5" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="5.6.3" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="5.6.3" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="5.6.3" />
</ItemGroup>
<ItemGroup>
<!-- removed project references -->
</ItemGroup>
</Project>







<RuntimeHostConfigurationOption Include="System.Globalization.Invariant" Value="true" />to your.csprojand check once.InvariantGlobalizationin .csproj.<PropertyGroup> <InvariantGlobalization>true</InvariantGlobalization> </PropertyGroup>.Refer this MSDoc<ItemGroup>element) and republished but again, same error.