I'm trying to open Visual Studio Code from Powershell using the code
command while inside a folder. When I try to do this, I always get this error:
Blockquote code : The term 'code' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + code . + ~~~~ + CategoryInfo : ObjectNotFound: (code:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
I found a closed GitHub issue (https://github.com/Microsoft/vscode/issues/22881) with the exact same problem and the solution for the person who asked for a solution was:
Go to File > Preferences > Settings
Change the property "terminal.integrated.shell.windows" as follows:
"terminal.integrated.shell.windows": "C:\Windows\System32\cmd.exe"
Restart visual studio.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With