[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project detection not working on WSL windows #2415

Open
1 task done
rcdsp opened this issue Mar 19, 2020 · 7 comments
Open
1 task done

Project detection not working on WSL windows #2415

rcdsp opened this issue Mar 19, 2020 · 7 comments

Comments

@rcdsp
Copy link
rcdsp commented Mar 19, 2020
  • I'm sure this issue is not a duplicate.

VS Code instances running on WSL do not seem to auto detect project or workspace settings, this means that opening a project on Windows will set a preset and later on, any project that i open from WSL will be using that preset, the only way to change it is setting up another preset on a Windows project. Icon presets seem to work really well on a single window, but with multiple vscode windows, they just mix and act weirdly, i made a comment in here about presets mixing between to vscode windows tho that is under another discussion, i made searches about WSL and auto detection and couldn't find anything so i hope this is not an isolated issue, but it would be nice to at least be working on a single WSL project at a time (due to the preset mix) and get auto detection.

In this example i'm opening two workspaces that switch between angular and nestjs preset, both projects are brand new created with @angular/cli and @nestjs/cli

Also on that demo i didn't try to se this "vsicons.projectDetection.autoReload": true on the WSL instances but later on i did and the result was the same, nest project stayed with angular preset even after deleting settings.json(workspace) reloading windows, creating a new settings.json(workspace) and setting "vsicons.presets.nestjs": true in it.

vsicons-wsl-autodetect

@JimiC
Copy link
Member
JimiC commented Mar 24, 2020

This requires investigation something that I can't do atm. If I had to guess I would say that this behavior is occurring because Windows and WSL share the same vscode installation and thus the same icon manifest file. How about two separate vscode installations, one user and one system or even portable mode?

@JimiC
Copy link
Member
JimiC commented Mar 24, 2020

Come to think of it user and system installations share the same icon manifest file too.

@JetUni
Copy link
JetUni commented Mar 30, 2020

It may have something to do with #2199

@JimiC
Copy link
Member
JimiC commented Apr 17, 2020

So I found some time to look into this. Things are exactly as I suspected.

Both vscode instances use the same vscode-icons extension simply because we have told vscode that it should run vscode-icons from the local file system and not the remote one (see #2404). If you open the Extensions explorer you will notice that vscode-icons is only installed locally and not on WSL and that vscode does not provide an option to install it in WSL.

Now if you go to your settings (settings.json) and add the following:

"remote.extensionKind": {
    "vscode-icons-team.vscode-icons": ["workspace"]
}

by reloading vscode you will now notice an option to install vscode-icons on WSL. By doing so you will see vscode-icons showing up in the WSL part of the Extensions explorer.

From there on, experiment further.

Hope this helps.

@JetUni
Copy link
JetUni commented Apr 17, 2020

That workaround works perfectly! Is this something that you could eventually work into the extension itself to avoid having to do this on each machine?

@JimiC
Copy link
Member
JimiC commented Apr 17, 2020

We are still contemplating on it.

@OmarOmeiri
Copy link

@JimiC I have made this and I could make the installation successful in WSL, but somehow, the extension is appending C:\ to my project path. This is what the logs show.

[2021-12-10 09:44:12.579] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/Omar/.vscode-insiders/extensions/vscode-icons-team.vscode-icons-11.8.0/dist/src/vscode-icons.bundle.js
[2021-12-10 09:44:13.359] [exthost] [error] Activating extension vscode-icons-team.vscode-icons failed due to an error:
[2021-12-10 09:44:13.359] [exthost] [error] Error: ENOENT: no such file or directory, open 'C:\home\omar\CODE\Lullo\Client\package.json'
[2021-12-10 09:49:45.396] [exthost] [info] extension host terminating: renderer closed the socket
[2021-12-10 09:49:46.402] [exthost] [info] exiting with code 0

I'm suspecting this is why my custom icons aren't loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants