-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Run VS Code outside the Developer Command Prompt" instructions in documentation do not work #135994
Comments
Neglected to mention this can be fixed by replacing line 10 of the example with: |
I'm not able to reproduce this issue. Did you copy the entire tasks.json from step 2? |
Apologies for the late reply, the tasks.json is copied in it's entirety, I even tested the same scenario on a 2nd computer with the same spacing issue appearing. |
Can you share all your VS Code settings? |
Settings are pretty basic but sure: |
I met the same issue too. |
I still can't reproduce this when I copy verbatim from https://code.visualstudio.com/docs/cpp/config-msvc#_run-vs-code-outside-the-developer-command-prompt. If you make a mistake while copying then you could see the described error. Note that the line in question has [
"\"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/Tools/VsDevCmd.bat\"", // this is correct
"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/Tools/VsDevCmd.bat" // this is incorrect
] |
I have the same issue ("'C:/Program' is not recognized as an internal or external command"). The path I use does contain
The workaround proposed by @cncz42 doesn't work for me. Typing |
I ran into this problem too. But eventually found out that I had misspelled the path. If the text in quotes passed into EDIT: Also notice that, the |
Unfortunately, in my case, the path is correct, and corresponds to the actual script. The exact same path works if copy-pasted into a terminal. |
Does this issue occur when all extensions are disabled?: Yes/No
Yes
Steps to Reproduce:
'C:/Program' is not recognized as an internal or external command, operable program or batch file. The terminal process "cmd.exe /C "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/Tools/VsDevCmd.bat" && cl.exe /Zi /EHsc /Fe: "c:\Users\cncz4\OneDrive\Code Projects\CppTest\test.exe" "c:\Users\cncz4\OneDrive\Code Projects\CppTest\test.cpp"" terminated with exit code: 1.
It does compile correctly when run out of a developer command prompt and the bat is in the right path, so either there's an obscure configuration error on my end or that documented tasks.json edit is wrong/out of date.
The text was updated successfully, but these errors were encountered: