[Installer] Windows Desktop Runtime Bundle.wxs omits 1033 LCID folder, breaking -lang 1033 and forcing non-English UI on en-US Windows with a secondary keyboard layout

Ouverte Adaptée aux débutants
#137,376 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
2/5
Temps estimé
1-3 heures
Accessibilité débutants
76/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
csharp, xml

Piste de recherche

Commencez par localiser la boucle d’authoring de Bundle.wxs décrite dans l’issue et vérifier quels LCID elle inclut dans les bundles d’installation. Si cela se confirme, ajoutez l’entrée 1033 manquante à l’authoring partagé du bundle concerné, puis compilez l’installateur affecté et vérifiez que sa charge utile .ba contient un dossier 1033 avec les ressources linguistiques. L’issue est résolue lorsque -lang 1033 sélectionne l’anglais sur la configuration Windows décrite.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

area-Setup untriaged
Description

The Windows Desktop Runtime installer (windowsdesktop-runtime-11.0.0-win-x64.exe, built with Burn x86 v6.0.3-dotnet.6) launches with a non-English UI (e.g., Russian WixStdBALanguageId = 1049) on a fully English (en-US) Windows 11 system whenever a user has a secondary language added to their Windows User Language List for keyboard layout switching.

Furthermore, explicitly passing -lang 1033 on the command line is ignored and still forces the installer UI into the secondary language (1049).

Reproduction Steps
  1. Use an English (en-US) Windows 11 installation (GetUserDefaultUILanguage = 1033, Windows Display Language set to en-US).
  2. Have a secondary language in the Windows User Language List for keyboard input switching (Ctrl+Shift / Alt+Shift) that matches one of the 13 translated LCID subfolders in the bundle (for example, en-US as primary and ru as secondary).
  3. Run windowsdesktop-runtime-11.0.0-win-x64.exe (or run windowsdesktop-runtime-11.0.0-win-x64.exe -lang 1033).
Expected behavior

The installer UI should launch in English (en-US / 1033), respecting the primary Windows display language (0409 / 1033 being first in GetUserPreferredUILanguages and GetThreadPreferredUILanguages) or the explicit -lang 1033 CLI switch.

Actual behavior

The installer ignores both the primary en-US (1033) OS display language and the -lang 1033 CLI argument, setting WixStdBALanguageId to 1049 and displaying the UI in the secondary language.

Sanitized Burn log excerpt:

i001: Burn x86 v6.0.3-dotnet.6, Windows v10.0 x64 (Build 26200: Service Pack 0), path: C:\Downloads\windowsdesktop-runtime-11.0.0-win-x64.exe
i009: Command Line: '-lang 1033'
i000: Setting version variable 'WixBundleFileVersion' to value '6.0.3.6'
i000: Setting numeric variable 'WixStdBASuppressOptionsUI' to value 1
i000: Setting numeric variable 'WixStdBAShowVersion' to value 1
i000: Setting numeric variable 'WixStdBALanguageId' to value 1049

### Regression?

_No response_

### Known Workarounds

Passing `-lang 1033` does **not** work because `.ba\1033\thm.wxl` does not exist in the payload. The only workaround is running the installer without full UI (`/passive` or `/quiet`).

### Configuration

- **Installer:** `windowsdesktop-runtime-11.0.0-win-x64.exe` (`Burn x86 v6.0.3-dotnet.6`)
- **OS:** Windows 11 x64 (`en-US` Display Language)
- **Architecture:** x64

### Other information

### Prior Art & Exact Line of Code Causing the Bug

This exact root cause was previously identified by @joeloff back in 2020 in https://github.com/dotnet/aspnetcore/issues/25763#issuecomment-748526681 (and tracked in `dotnet/installer#2453`), where `1033` was omitted from the `<?foreach lcid ...?>` preprocessor loop in `Bundle.wxs`:

```xml
<?foreach lcid in 2052;1028;1029;1031;3082;1036;1040;1041;1042;1045;1046;1049;1055?>
However, dotnet/aspnetcore#25763 was closed in 2021 without adding 1033 to the Bundle.wxs loop for the Windows Desktop Runtime installer (windowsdesktop-runtime-11.0.0-win-x64.exe).

Verification in .NET 11.0.0 (windowsdesktop-runtime-11.0.0-win-x64.exe)
Missing 1033 subfolder in .ba payload:
When windowsdesktop-runtime-11.0.0-win-x64.exe extracts its Bootstrapper Application payload to %TEMP%\{GUID}\.ba\, it still creates only those exact 13 LCID subdirectories (1028, 1029, 1031, 1036, 1040, 1041, 1042, 1045, 1046, 1049, 1055, 2052, 3082) and omits 1033:

Plaintext
Directory: %TEMP%\{GUID}\.ba

Mode   Name                            Length
----   ----                            ------
d----- 1028
d----- 1029
d----- 1031
d----- 1036
d----- 1040
d----- 1041
d----- 1042
d----- 1045
d----- 1046
d----- 1049
d----- 1055
d----- 2052
d----- 3082
-a---- BootstrapperApplicationData.xml 9290
-a---- BootstrapperExtensionData.xml   276
-a---- dotnet.ico                      45150
-a---- DotNetLogo_256x.png             2154
-a---- license.rtf                     215
-a---- logo.png                        852
-a---- thm.wxl                         7373
-a---- thm.xml                         12017
-a---- wixstdba.exe                    442288
How wixstdba.exe (LocProbeForFile) falls through:
When a user has en-US as their primary language and ru as a secondary language in the Windows language list (for keyboard layout switching), GetThreadPreferredUILanguages(0x34) (MUI_LANGUAGE_ID | MUI_MERGE_SYSTEM_FALLBACK | MUI_MERGE_USER_FALLBACK) returns:0409 (1033) -> 0009 (9) -> 0419 (1049) -> 0019 (25).

wixstdba.exe probes for .ba\<LCID>\thm.wxl across the list before falling back to the root .ba\thm.wxl:

Checks -lang 1033 -> looks for .ba\1033\thm.wxl -> Not found.

Checks 0409 (1033) -> looks for .ba\1033\thm.wxl -> Not found.

Checks 0009 (9) -> looks for .ba\9\thm.wxl -> Not found.

Checks 0419 (1049) -> looks for .ba\1049\thm.wxl -> Found!

Suggested Fix
Add 1033 to the <?foreach lcid in ...?> loop in Bundle.wxs (and any shared bundle authoring targets used by windowsdesktop-runtime, dotnet-runtime, and dotnet-sdk installers) so that .ba\1033\thm.wxl is packaged alongside the other 13 LCID folders.
Langage dominant
C#
Étoiles
18.4k
Forks
5.8k
Merge moyen
2 j 19 h
PR mergées (30 j)
590

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de dotnet/runtime

Toutes les issues de dotnet/runtime

Issues similaires

Plus d'issues C#

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.