Extra VS Code Settings for Windows

Got it perfect , remember to change the part where the version is, if you are running a more recent one:
{
“terminal.integrated.shell.windows”: “cmd.exe”,
“terminal.integrated.shellArgs.windows”: [
“/k”, “C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\Common7\Tools\VsDevCmd.bat”
]
}
Notice the 2019 insted of the 2017 ^^.

If you’re coming from an existing VS2017/2019 installation and you’ve already installed the C++ package your path should be (for 2019)

{
    "terminal.integrated.shell.windows": "cmd.exe",
    "terminal.integrated.shellArgs.windows": [
        "/k", "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\Common7\\Tools\\VsDevCmd.bat"
    ]
}

Ok, I have tried all the solutions listed here, and I am still getting the:

‘cl’ is not recognized as an internal or external command, operable program or batch file

error.

I can’t figure this out for the life of me.

Ok, so after trying to figure this out, on a whim, I went and changed my prompt from C:\Users\jjes7>
to C:\Program Files (x86)\Microsoft Visual Studio\2019\Community> and it works.

Will I have to change anything else using this directory to make C++ compile correctly, or, is it ok like this?

I get this errer massege every time: “Unable to write into user settings because the file is dirty. Please save the user settings file first and then try again.”
Can’t figure out what im doing wrong.

So I am stumped. This was working up until today. Today for some reason when I type triplex.cpp instead of it compiling in the VS code terminal it opens Visual Studio 2017 and I cannot get it to compile in there. I tried giving up on VS Code and creating a c++ file in VS2017 but apparently it doesn’t like the iostream or more specifically cout as it says it does not exist. I noticed the version of VS 2017 it kicks open is not quite the full version I am used to from Unity nor from when I created the c++ file.

Here are my settings. I have checked and like I said they worked a few days ago. Also I tried changing the path to cmd.exe to the full path but that didn’t help so I changed it back.

Here is the VS2017 window that pops up. If anyone knows how to compile it in here please let me know and I am ok with doing it that way.

@ psstendahl I had the same issue. I noticed that there was a prompt at the bottom of the screen to customize my settings for commands at that point and once I clicked to do so it asked whether to customize for commands or for shells, I chose commands. It then prompted me to save and try again and after doing so, cmd popped up for me. Hopefully this helps anyone else who runs into this.

This worked for me.
Depending on where your file is you may have to change the path.
What I had to use is below.

Before:

{
    "terminal.integrated.shell.windows": "cmd.exe",
    "terminal.integrated.shellArgs.windows": [
        "/k", "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\Common7\\Tools\\VsDevCmd.bat"
    ]
}

After:

{
    "terminal.integrated.shell.windows": "cmd.exe",
    "terminal.integrated.shellArgs.windows": [
        "/k", "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\Common7\\Tools\\VsDevCmd.bat"
    ]
}

Hello everyone. I’ve read through all of the comments and tested most, but none of them worked for me. I keep getting the error message that “cl” couln’t be found or is written in the wrong way

I somehow fixed it after some trying :wink:

how’d you fix it? got the same issue

fixed realized the I had something else where it said buildtools

2 Likes


Hello. I’ve read through all of the comments, tested most, but none of them worked for me. I keep getting the error message that “cl” could not be recognized as a command.

i did that and saved the file now it shows "terminal exited with code: 1

Hey guys,

So, I had trouble with this as well.

'cl' is not recognized as an internal or external command

My issue with it was that I was using VS Build Tools 2017 that was installed along with VS Community 2017.

Quick Fix: Download VS Build Tools 2019 by itself and change the file location to 2019

"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\Tools\\VsDevCmd.bat"

Cheers!

1 Like

Thanks, SpaceCat, if I hadn’t seen this beforehand, I would have just ran with the code provided.

Thank you.

If any one is getting an error " Program is Not Recognized as an Internal or External Command" follow these steps in this video https://www.youtube.com/watch?v=s2Vofz6YxyY after you’ve done that restart your PC then open up Visual code and on the top left where it says terminal click it then make a new terminal and you shouldn’t have that problem anymore

1 Like

I could really use some help this is the code Im typing:

{
    "terminal.integrated.shell.windows": "cmd.exe",
    "terminal.integrated.shellArgs.windows": [
        "/k", "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Common7\\Tools\\VsDevCmd.bat"
    ]
}

Got it to work I had visual studio community installed. i uninstalled everything and reinstalled only the essentials as per his instructions and now im golden

error
I have this error, I’ve looked at the location of the Developer Command Prompt and it’s exactly the same that I’ve put in my code. I don’t know what to do. I’ve also tried the other codes and nothing works. What can I do to fix it?

Privacy & Terms