skip to Main Content

Known issue: https://github.com/microsoft/vscode/issues/182277

I have added the COMPUTERNAME to the allowed list.
enter image description here

After which I continue to receive this message. It also appears after I have rebooted the machine and started VS Code again.
enter image description here

PS C:> code --version
1.78.2
b3e4e68a0bc097f0ae7907b217c1119af9e03435
x64

2

Answers


  1. 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

    Login or Signup to reply.
  2. Try adding the following to your settings.json file:

    "security.allowedUNCHosts": ["[UNC path]", "wsl.localhost", "wsl$"]
    

    Replace [UNC path] with the server path i.e. \server-ausersprofile would go in the settings.json file like:

    "security.allowedUNCHosts": ["server-a", "wsl.localhost", "wsl$"]
    

    The settings.json file can be found in %APPDATA% --> CodeUser folder
    or 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search