Add additional environment for invariant mode
authorWoongsuk Cho <ws77.cho@samsung.com>
Tue, 19 Apr 2022 23:40:16 +0000 (08:40 +0900)
committer조웅석/Common Platform Lab(SR)/삼성전자 <ws77.cho@samsung.com>
Wed, 20 Apr 2022 22:27:35 +0000 (07:27 +0900)
.NET 6 contains breaking change related to globalization invariant mode.
(https://docs.microsoft.com/en-us/dotnet/core/compatibility/globalization/6.0/culture-creation-invariant-mode)
For backward compatibility, add an additional environment variable to avoid breaking changes
- DOTNET_SYSTEM_GLOBALIZATION_PREDEFINED_CULTURES_ONLY=false

NativeLauncher/launcher/exec/launcher.cc

index 7f8b8d4..dcb8e89 100644 (file)
@@ -61,6 +61,7 @@ int main(int argc, char *argv[])
 
                if (GlobalizationInvariantOption.compare(argv[i]) == 0) {
                        setenv("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT", "1", 1);
+                       setenv("DOTNET_SYSTEM_GLOBALIZATION_PREDEFINED_CULTURES_ONLY", "false", 1);
                } else if (StandaloneOption.compare(argv[i]) == 0) {
                        if (i > argc - 1) {
                                _ERR("Assembly path must be after \"--standalone\" option");