You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Latest version 1.29.2 fails to see MSVC environment #14084
Logan Bender (@mambo4) I don't repro the issue -- which MSVC developer command prompt are you using exactly (i.e. which version of VS, which target architecture)? Also, what happens if you don't start VS Code from a developer command prompt (and instead rely on the "apply Visual Studio Developer environment")?
I believe it is checking for NETFXSDKDir which you don't have. As a workaround, try defining this variable to something (hopefully it doesn't matter what). We should remove this variable from the environment test.
I set NETFXSDKDir = C:\temp in windows system environment variables
it shows up in a the vanilla cmds set result
but it vanishes when using MSVC Developer command prompt
even if I try to set it in my .bat before launching Developer command prompt
Developer command prompt must have a different env
So the issue persists
If I
launch Developer command prompt
Launch VS Code from Developer command prompt
set NETFXSDKDir=C:\temp from the terminal inside VS Code
launch VSCode again from the terminal inside VS Code
only then, in the second VS Code session, does it actually seem to work
similar issue here, switching to vscode profile with new version of cpp extension blocks/loses some part of msvc environment variables which breaks compiling and debugging, to be detailed:
If I
launch Developer command prompt (hostx64-targetx64 on win11)
run "set INCLUDE", I can see all headers, compilers paths correctly
Launch VS Code with a clean profile(with no extensions installed) from Developer command prompt
Open vscode internal terminal and do step 2, envs stay normal
Switch to a vscode profile with cpp extension installed, and run step 2 in a new internal terminal, I can only get part of the INCLUDE (same for LIB) env left, some paths ending in "winrt" is gone, while intellisense is reporting headers like "float.h" in "ucrt" paths could not be found
similar issue here, switching to vscode profile with new version of cpp extension blocks/loses some part of msvc environment variables which breaks compiling and debugging, to be detailed:
If I
launch Developer command prompt (hostx64-targetx64 on win11)
run "set INCLUDE", I can see all headers, compilers paths correctly
Launch VS Code with a clean profile(with no extensions installed) from Developer command prompt
Open vscode internal terminal and do step 2, envs stay normal
Switch to a vscode profile with cpp extension installed, and run step 2 in a new internal terminal, I can only get part of the INCLUDE (same for LIB) env left, some paths ending in "winrt" is gone, while intellisense is reporting headers like "float.h" in "ucrt" paths could not be found
problem solved by updating and repairing visual studio installation
Activity
sean-mcmanus commentedon Dec 4, 2025
Logan Bender (@mambo4) I don't repro the issue -- which MSVC developer command prompt are you using exactly (i.e. which version of VS, which target architecture)? Also, what happens if you don't start VS Code from a developer command prompt (and instead rely on the "apply Visual Studio Developer environment")?
mambo4 commentedon Dec 5, 2025
bobbrow commentedon Dec 5, 2025
I believe it is checking for
NETFXSDKDirwhich you don't have. As a workaround, try defining this variable to something (hopefully it doesn't matter what). We should remove this variable from the environment test.mambo4 commentedon Dec 6, 2025
I set NETFXSDKDir = C:\temp in windows system environment variables
it shows up in a the vanilla cmds
setresultbut it vanishes when using MSVC Developer command prompt
even if I try to set it in my .bat before launching Developer command prompt
Developer command prompt must have a different env
So the issue persists
If I
set NETFXSDKDir=C:\tempfrom the terminal inside VS Codeonly then, in the second VS Code session, does it actually seem to work
Stargazer1209 commentedon Dec 8, 2025
similar issue here, switching to vscode profile with new version of cpp extension blocks/loses some part of msvc environment variables which breaks compiling and debugging, to be detailed:
If I
Stargazer1209 commentedon Dec 8, 2025
problem solved by updating and repairing visual studio installation
sean-mcmanus commentedon Dec 9, 2025
Logan Bender (@mambo4) A fix is released in https://github.com/microsoft/vscode-cpptools/releases/tag/v1.29.3 . However, you need to run the Clear or Set Developer Environment command again.