Open jakubch1 opened 9 months ago
When building we were setting env var DOTNET_SYSTEM_GLOBALIZATION_INVARIANT
to 1
. This was causing all above warnings. Probably fix should check for this env var and not generate warnings if set to 1
.
We're running into the exact same issue in our solution. We're also using DOTNET_SYSTEM_GLOBALIZATION_INVARIANT
, but still getting a ton of these NETSDK1188 warnings. Here's an example from our logs:
[WRN] /home/gitlab-runner/builds/g_czk3Jmq/0//.nuke/temp/dotnet-unix/sdk/8.0.200/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.CSharp 4.5.0 has a resource with the locale 'pl'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/home/gitlab-runner/builds/g_czk3Jmq/0/.csproj]
Tried the global <NoWarn>$(NoWarn);NETSDK1188</NoWarn>
, but no luck – the warnings are still there and cluttering up our logs.
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=0
Worth checking documentation https://learn.microsoft.com/en-us/dotnet/core/runtime-config/globalization
Installing&enabling globalization support is not a solution but a workaround.
Specially as we are talking about test platform packagesa. Why would it force you to change the environment to avoid warnings about cultures that are not relevant for the test environment.
Our CI build is producing many warnings like this:
It is happening only on unix (ubuntu, alpine and macos). Building same code on windows is not causing it. I am also not able to repro it locally. We build our code using arcade infrastructure. Link to example build: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=8840677&view=logs&j=9da81d86-a7e8-53ea-404c-b4879343d50c&t=9ef44dce-4b34-5e1a-8b43-8a202ad719eb&l=77