问题
After creating angular application using angular cli, I tried to open the solution in visual studio code using "code ." command from command prompt, but it shows below error. Any suggestion?
回答1:
Provided that you are using Windows, make sure your vscode
bin folder is declared on your Environment Variable Path
. Either user or system will do but, I recommend declaring on System Variables therefore it's available for all users.
Visual studio code usually is installed on the following directories depending on your installation architecture. Declare one of those on your Path
and it should be available already.
x86
C:\Program Files (x86)\Microsoft VS Code\bin
x64
C:\Program Files\Microsoft VS Code\bin
Warning: Older versions of Windows requires you to restart the operating system in order to change environment variables effectively.
来源:https://stackoverflow.com/questions/47176780/code-command-is-not-working-in-command-prompt