microsoft / microsoft/vscode

Windows CLI binary ignores product.overrides.json for application name and metadata

Open
#333,471 3 comments 0 reactions 1 assignee Claimed by @deepak1556 View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

**VS Code Version:** [Insert version here, e.g., 1.82.2]
**OS Version:** [Insert OS here, e.g., Windows 11]

**Steps to Reproduce:**
1. Create a `product.overrides.json` file in the repository root overriding the `nameLong` and `applicationName` properties.
2. Ensure `VSCODE_CLI_PRODUCT_JSON` is *not* set in your environment.
3. Build the VS Code CLI binary for a Windows target (`x86_64-pc-windows-msvc`).
4. Right-click the resulting `code.exe` binary, select **Properties**, and check the **Details** tab.

**Expected behavior:**
The "File description" and "Product name" properties embedded in the Windows executable should reflect the overridden values provided in `product.overrides.json` (just as the rest of the CLI successfully respects them).

**Actual behavior:**
The Windows binary ignores the overrides entirely, embedding the default `Code - OSS` and `code.exe` values regardless of what is configured in `product.overrides.json`.

**Code context:**
In `cli/build.rs`, the fallback logic in `apply_win32_version_resources` is missing the override merge check present elsewhere in the file. It only loads the base `product.json` when `VSCODE_CLI_PRODUCT_JSON` is missing:
```rust
let product_json_path = match env::var("VSCODE_CLI_PRODUCT_JSON") {
Ok(v) => { /* path normalization */ }
Err(_) => repo_dir.join("product.json"), // Misses product.overrides.json
};

let product: HashMap = read_json_from_path(&product_json_path);
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.