-
Notifications
You must be signed in to change notification settings - Fork 4k
Open
Labels
area:buildRelates to building extensions from sourceRelates to building extensions from sourcedependenciesPull requests that update a dependency filePull requests that update a dependency fileide:vscodeRelates specifically to VS Code extensionRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavioros:windowsHappening specifically on WindowsHappening specifically on Windows
Description
Problem
When building the VS Code extension VSIX from WSL2, the resulting extension fails to activate with:
Error: \\?\c:\Users\...\node_sqlite3.node is not a valid Win32 application
Root Cause
The VS Code extension host runs on Windows even when connected to a WSL remote workspace. However, building the VSIX on Linux produces Linux-only native binaries (sqlite3, LanceDB, ripgrep).
The prepackage script defaults to the current platform:
[info] Using target: linux-x64
Attempted Solutions
-
--target win32-x64- Fails because Windows dependencies (rg.exe) aren't available on Linux:Error: The following files were missing: - node_modules/@vscode/ripgrep/bin/rg.exe -
Environment variable
CONTINUE_VSCODE_TARGET=win32-x64- Same issue
Impact
Developers using WSL2 (a common setup) cannot:
- Build and test local VSIX changes
- Iterate on native module-dependent features
- Verify fixes before submitting PRs
Suggested Solutions
- Cross-platform VSIX builds - Download pre-built Windows binaries during Linux builds when targeting win32
- Documentation - Document that WSL2 developers must use marketplace version or build on native Windows
- Universal binaries - Include all platform binaries in the VSIX (larger but always works)
Environment
- WSL2 Ubuntu on Windows 11
- VS Code with Remote - WSL extension
- Node.js v22.17.0
Related
This was discovered while working on PR #9325 (WSL2 terminal command fix).
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
area:buildRelates to building extensions from sourceRelates to building extensions from sourcedependenciesPull requests that update a dependency filePull requests that update a dependency fileide:vscodeRelates specifically to VS Code extensionRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavioros:windowsHappening specifically on WindowsHappening specifically on Windows
Type
Projects
Status
Todo