Known issue: https://github.com/microsoft/vscode/issues/182277
I have added the COMPUTERNAME to the allowed list.
After which I continue to receive this message. It also appears after I have rebooted the machine and started VS Code again.
PS C:> code --version
1.78.2
b3e4e68a0bc097f0ae7907b217c1119af9e03435
x64
2
Answers
in windows explorer, open you WSL host and map it (right click on WSL host and choose map network drive) and choose any drive letter (i.e Z),
in vs code: after the mapping is done, you can start to use it and add your WSL folder to your workspace in your vs code like ussual
Try adding the following to your
settings.json
file:Replace [UNC path] with the server path i.e.
\server-ausersprofile
would go in thesettings.json
file like:The
settings.json
file can be found in%APPDATA% --> CodeUser
folderor for VSCode Portable in the Datauser-dataUser folder. Make sure to restart all instances of VSCode after changing this setting.
Alternatively, in VSCode you can use ctrl + , and search for Allowed UNCHosts, then add wsl$, wsl.localhost, and [UNC path name] i.e. server-a.