vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Project path makes compilation tool path not able to read correctly

Open LearnWebGitHub opened this issue 1 year ago • 0 comments

This issue is reproducible, but it's locked so I cannot leave any comment. I'm not sure if this bug comes from VS Code or the extension so I open this here.

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): tools will be launch 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 C++): will get error 'C:/Program' is not recognized as an internal or external command

but in this case they'll both work:

MSVC tools path: "C:\"/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/Tools/VsDevCmd.bat\""

LearnWebGitHub avatar Oct 19 '24 12:10 LearnWebGitHub