Steps to Reproduce:
Unable to open '[folder name]': Unable to read file (Error: No remote extension installed to resolve wsl.).
The 'Remote - WSL' extension is recommended as you have Windows Linux Subsystem (WSL) installed on your system.
Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: [Not applicable, need extension for remote connection.]
When opening remote connection to WSL directly from VS Code instead of opening from terminal, connection can be established. (Or, after VS Code fails to establish connection, closing the window and opening it again will establish connection.) All extensions seem to fail when trying to establish connection through WLS terminal.
I'm having the same issue. My environment has been working fine for months and as of yesterday this is happening.
While guess here, maybe you have multiple VSCode installs and code . gets the wrong one?
Do a which code in the WSL terminal and verify that there's no other VSCode install that interferes.
From what I can tell, there appears to be just one install? (Unless I misread.) This is my result:
$ which code
/mnt/c/Program Files/Microsoft VS Code/bin/code
And like the other person, this suddenly started happening after months of everything working fine.
close and try again is fine.
I have been struggling with the same issue today, and I was able to fix it using only this method:
rm ~/.vscode-server -rfRemove-Item ~/.vscode -Recurse -Force ( this will delete all your installed extensions )There has been some fixes in this area, do you still see the problem? If yes, please run
VSCODE_WSL_DEBUG_INFO=true code . and create me a new issue.
Most helpful comment
I have been struggling with the same issue today, and I was able to fix it using only this method:
rm ~/.vscode-server -rfRemove-Item ~/.vscode -Recurse -Force( this will delete all your installed extensions )