Skip to content
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

Project path makes compilation tools path not able to be read correctly #13049

Open
LearnWebGitHub opened this issue Dec 13, 2024 · 0 comments
Open
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)

Comments

@LearnWebGitHub
Copy link

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\""

@sean-mcmanus sean-mcmanus added bug Language Service help wanted Can be fixed in the public (open source) repo. tasks/build/debug An issue relating to tasks.json (e.g. build issues) labels Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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)
Projects
Status: No status
Development

No branches or pull requests

2 participants