-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
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 correctly
MSVC 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 command
but 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\""
Metadata
Metadata
Assignees
Labels
Type
Projects
Status