Extra VS Code Settings for Windows

It didn’t work for me. Here’s exactly what I have in my settings.json file after pasting in the code:

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

I type “dir” and it works fine, throwing back the usual output. Then I do “cl.”
Here’s the output it gives me:

'cl' is not recognized as an internal or external command,
operable program or batch file.

I tried switching “BuildTools” to “Community” but it still didn’t work. My window is labeled “1:cmd” so I know it’s at least seeing it. Can anyone help me?

I’m having the same issue too, cl isn’t working, I tried some of the suggestions but I’m not getting anything to work.

I reinstall bid tools for the 2019 version now and still having the same issue.

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

Thanks!

I am experiencing the same error after entering ‘cl’.

However, settings.json added an extra line of code at the top (in my screenshot). I get the same error if I delete this line. I have checked the developer command prompt directory path as in the video and tried quite a few of the suggestion but receive the same error each time.

Any suggestions?

Edit: It is finally working! I saved the file and closed Visual Studio and several hours later came back to it and it worked. :slight_smile:

For anyone expiriencing the same issue. Try putting in forward slashes insead of the double backwards.
Like this

"terminal.integrated.shellArgs.windows": [
        "/k",
        "C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/Tools/VsDevCmd.bat"
],

Closed the program and reopened it, but it’s still not working. I tried putting in forward slashes, which changed the color of the slashes from orange to green, but it didn’t change the output. Current code:

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

One new thing: the first line (“terminal.integrated.shell.windows”: “cmd.exe”,) has a new red squiggle under it. When I click on the errors, it highlights it and tells me “Expected comma jsonc(514) [4, 5]”, but I’m not sure what that means.

still nothing for me too.

It sucks because I’m stuck at this spot. Anyone know if I can just skip Visual Code and Go ahead and just use Visual Studio Community?Capture

OMG I got it to work, all I needed to do was save, and then re-enter MS code. I thought it was auto saving when I close VS code, but for some reason it needs you to save.

2 Likes

Interesting:
It still isn’t working, but I noticed that at the top of the terminal today it said

'C:/Program' is not recognized as an internal or external command,
operable program or batch file.

I believe it is referring to the line of code

 "/k", "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/Common7/Tools/VsDevCmd.bat"

And how it’s not seeing Program Files as one thing but rather two different ones. I think this is what it means, but I still can’t get it to work, or figure out what it wants me to do about it. If anyone has any suggestions, please let me know.

saved me with that comment, did that as well and its working

I was having a lot of trouble with cl command on the developer command prompt when editing the settings.json file. Not sure if anyone else had the same problem but I had to change the file date to 2019 and don’t forget to save that file. This is the one thing I kept on forgetting to do after hours of frustration. DUH!

1 Like

I have “2019” instead of “2017” in my developer command prompt. Do I need to change it?

Aha! Well, don’t I feel silly. Thanks for reminding me about the year! X3

I have the same issue. Do I need to unistall C++ compiler or do I just follow the “install windows Windows 10 C++ Compiler” and install C++ compiler even though I have it installed.

Yes you did!!

I am getting
‘C:\Program’ is not recognized as an internal or external command,
operable program or batch file.
I have already tried doing everything recommended in this thread but still getting the same.Somebody help please

I did that but I am still getting the same error.
Screenshot%20(2)
Please tell me what I am doing wrong

I have been at this for hours and gotten literally nowhere. I’ve tried everything that has been mentioned in the comments so far

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

Ive also tried the C:\WINDOWS\System32\cmd.exe”,to no luck

1 Like

I found a difference between my Microsoft Visual Studio and the one shown in the lecture

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

Mine path: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Common7\\Tools\\VsDevCmd.bat"

Hope this may help someone. Just replace the path you copy with your actual path. Plus adding a few extra backward slashes.

Make sure to close and re-open the Terminal page after you save settings.json.

Can you paste your Target from your Developer Terminal?

Thank you so much for sharing! This helped me alot!!!

Privacy & Terms