As the title says, VS Code is not recognizing cl
compiler although opened via Visual Studio 2022 Developer Command Prompt
:
I have tried using VS Code external terminal with %comspec% /k "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat"
which did not work.
Setting the comspec
manualy in the terminal did solve the issue for the terminal instance:
But the C++
extension is still complaining about cl.exe
:
cl.exe build and debug is only usable when VS Code is run from the Developer Command Prompt for VS.
I have never used VS Code for C++ before and I don't use windows for development at all so go easy on me.
What could be the reason for the issue and how it can be solved?