[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

オープン 初心者向け
#137,376 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp, xml

調査の方向性

まず、issueで説明されている Bundle.wxs のオーサリングループを見つけ、インストーラーバンドルにどのLCIDが含まれているかを確認します。確認できたら、該当する共有バンドルオーサリングに不足している1033のエントリを追加し、対象のインストーラーをビルドして、その .ba ペイロードに言語リソースを含む1033フォルダーがあることを確認します。説明されているWindows環境で -lang 1033 が英語を選択すれば、issueは完了です。

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
C#
スター
18.4k
フォーク
5.8k
平均マージ
2日 19時間
マージ済み PR(30日)
590

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dotnet/runtime のほかの issue

dotnet/runtime の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。