Project path makes compilation tools path not able to be read correctly #13049
Labels
bug
help wanted
Can be fixed in the public (open source) repo.
Language Service
tasks/build/debug
An issue relating to tasks.json (e.g. build issues)
I found out how to reproduce this issue.
(compilation's gonna fail even if the MSVC tools path is correct)
error: 'C:/Program' is not recognized as an internal or external command,
operable program or batch file.
If the path of my project (where ".vscode/tasks.json" is in) has any spaces, the MSVC tools path in tasks.json cannot be read correctly.
e.g.
MSVC tools path:
"\"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/Tools/VsDevCmd.bat\""
and the project path has no space(
C:\Users\Foo\Code\MSVC\C++\learn
): cl.exe is launched correctlyMSVC tools path:
"\"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/Tools/VsDevCmd.bat\""
and the project path has spaces(
C:\Users\Foo\Code\MSVC\C++\learn - copy
): get error 'C:/Program' is not recognized as an internal or external commandbut in this case they'll both work, that's why I'm sure my path is correct:
MSVC tools path:
"C:\"/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/Tools/VsDevCmd.bat\""
The text was updated successfully, but these errors were encountered: