xplat icon indicating copy to clipboard operation
xplat copied to clipboard

Can't use ng g mode in VS Code Remote/WSL2 setup

Open wayne-optin opened this issue 5 years ago • 2 comments

When I install xplat in a workspace in Windows' WSL using VS Code 'remote' I get this warning:

Note to VS Code users: no development mode set. xplat
could not find any VS Code settings in the standard location:
/var/local/Code/User/settings.json

This results in a files.exclude set up on the Windows side that only shows 'web' files ... if I generate e.g. an ionic app it doesn't appear in VS Code's file lists. The warning goes on to suggest:

It's possible you don't have a user settings.json yet.
If so, open VS Code User settings and save any kind of
setting to have it created.

But that doesn't work at all (nothing is created on the WSL side, it only affects the Windows side of the VS Code split setup)

The Workaround: manually change the settings.

I also asked a question on StackOverflow

wayne-optin avatar Nov 10 '19 16:11 wayne-optin

Just a note - the schematic update of tsconfig.json's exclude property on the WSL side seems to complete properly, even though the IDE settings aren't updated.

wstidolph avatar Nov 14 '19 19:11 wstidolph

I'd also add that the default settings.json location on a Linux machine should be ~/.config/Code/User/settings.json, as stated in the VSCode's doc: https://code.visualstudio.com/docs/getstarted/settings#_settings-file-locations

@NathanWalker Is there any chance you could apply a quick fix next minor release? I can make a PR if you'd like to review it.

HymanZHAN avatar Feb 09 '21 07:02 HymanZHAN