microsoft / microsoft/vscode-remote-release

`Code.exe: Invalid argument` after upgrading to Windows 11

Open
#7,050 32 comments 19 reactions 1 assignee View on GitHub

@aeschli is already working on this.

Since Dec 13, 2024.

upstream wsl
Dominant language
Dockerfile
Stars
4.2k
Forks
470
Avg merge
1d 1h
Merged PRs (30d)
1

Description

  • VSCode Version: 1.70.1
  • Local OS Version: Windows 11 21H2 22000.856
  • Remote OS Version: Ubuntu 20.04.4 LTS (WSL2)
  • Remote Extension/Connection Type: WSL
Steps to Reproduce:
  1. Ignore Windows 11 upgrade prompts for ages
  2. Upgrade to Windows 11
  3. Open terminal in WSL2 linux distro
  4. Navigate to a repo
  5. Type code . to launch VSCode
What you expected to see:

VSCode opens in remote mode

What you saw instead:
$ code .
/mnt/c/Users/jared/AppData/Local/Programs/Microsoft VS Code/Code.exe: Invalid argument
Notes
  • Opening VSCode directly and connecting to remote works fine
  • Opening VSCode in Windows (non-remote), uninstalling and re-installing the Remote - WSL extension fixes the issue temporarily. But when I restart my computer the problem returns. All the evidence I've found online suggests this fix and I was hopeful but for some reason it doesn't persist after a reboot.

I appreciate there's not a lot of info here. Please let me know what I can do to help troubleshoot this further.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.