Normally, you want to enforce culture-invariant builds to not risk affecting the build output by the culture of the build agent or (worse) workstation.
To resolve this, we run all builds with DOTNET_SYSTEM_GLOBALIZATION_INVARIANT. This crashes some documentation rules because these are newing up a CultureInfo with the hard coded default of "en-US".
As a workaround we can add a config setting the "documentationCulture" to "" (which means the invariant culture).
This is needed because it seems the behaviour of this mode was changed in .NET 6.0, previously setting it meant that all cultures were treated as the invariant culture, as documented here
https://github.com/dotnet/runtime/blob/main/docs/design/features/globalization-invariant-mode.md#cultures-and-culture-data
With .net 6 it appears it instead throws an exception, so this is possibly to be treated as a .net 6 compatibility issue in this library.
(Note that there are many ways to enable the global invariant mode, so checking for the environment variable is not sufficient)
Normally, you want to enforce culture-invariant builds to not risk affecting the build output by the culture of the build agent or (worse) workstation.
To resolve this, we run all builds with
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT. This crashes some documentation rules because these are newing up a CultureInfo with the hard coded default of "en-US".As a workaround we can add a config setting the "documentationCulture" to "" (which means the invariant culture).
This is needed because it seems the behaviour of this mode was changed in .NET 6.0, previously setting it meant that all cultures were treated as the invariant culture, as documented here
https://github.com/dotnet/runtime/blob/main/docs/design/features/globalization-invariant-mode.md#cultures-and-culture-data
With .net 6 it appears it instead throws an exception, so this is possibly to be treated as a .net 6 compatibility issue in this library.
(Note that there are many ways to enable the global invariant mode, so checking for the environment variable is not sufficient)