Type: Bug
Blocked from building code by the notification "cl.exe build and debug active file requires the Visual Studio developer environment."
- Uninstall existing VS Code and Developer Tools to start clean
- Install VS Code
- From the Welcome page, click on "Get started with C++ development"
- Install Microsoft.VisualStudio.2022.BuildTools using the instructions provided there, and proceed to follow additional instructions, hitting buttons, etc.
- Close VS Code
- type "developer" into Start Menu to launch developer command prompt
- confirm cl is recognized in developer command prompt
- Launch VS Code
- Go back to the C++ specific Welcome Page, and under the "Apply the Visual Studio developer environment" step, hit the button "Set Developer Environment". Receive a notification of success saying "amd64 developer environment for Visual Studio Build Tools 2022 successfully set."
- Go to my *.cpp file, and hit "Run C/C++ file"
- Choose "C/C++: cl.exe build and debug active file"
Expected result: code builds
Actual result: Get the failure notification "cl.exe build and debug active file requires the Visual Studio developer environment." This notification offers a button "Apply Developer Environment" but when I go through that step it doesn't help and gives me the additional failure notification "The source code could not be built because the Visual Studio developer environment was not applied."
All support info I find suggests this failure notification is due to not launching VS Code from the Developer Command Prompt, but I have done that.
This is possibly related to #14353 since they are both occurring for me.
If it helps to give you more confidence in my repro steps, I can take a screen recording of all of this and attach the video. Let me know if you'd like me to do that.
Extension version: 1.31.4
VS Code version: Code 1.114.0 (e7fb5e96c0730b9deb70b33781f98e2f35975036, 2026-04-01T09:27:11Z)
OS version: Windows_NT x64 10.0.19045
Modes:
System Info
| Item |
Value |
| CPUs |
Intel(R) Core(TM) i5-2320 CPU @ 3.00GHz (4 x 2993) |
| GPU Status |
2d_canvas: unavailable_software GPU0: VENDOR= 0x1002, DEVICE=0x677b [AMD Radeon HD 7400 Series], DRIVER_VENDOR=Google, DRIVER_VERSION=8.17.10.1404 GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.19041.5794 Machine model name: Machine model version: direct_rendering_display_compositor: disabled_off_ok gpu_compositing: disabled_software multiple_raster_threads: enabled_on opengl: disabled_off rasterization: disabled_software raw_draw: disabled_off_ok skia_graphite: disabled_off trees_in_viz: disabled_off video_decode: disabled_software video_encode: disabled_software webgl: unavailable_software webgl2: unavailable_software webgpu: unavailable_software webnn: unavailable_software |
| Load (avg) |
undefined |
| Memory (System) |
11.96GB (2.46GB free) |
| Process Argv |
. --crash-reporter-id 446329a1-4bb8-420a-8b52-627c7d2b9460 |
| Screen Reader |
no |
| VM |
0% |
A/B Experiments
vsliv368:30146709
vswsl492cf:30256860
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
4f60g487:31327383
6abeh943:31336334
envsdeactivate2:31464701
cloudbuttont:31379625
aihoversummaries_t:31469308
3efgi100_wstrepl:31403338
56b7f661:31457055
use-responses-api:31390855
defaultusage:31403421
ec5jj548:31422691
cp_cls_t_966_ss:31454198
inlinechat_v2_hd992725:31485760
4je02754:31466945
c3h7c220:31478652
cp_cls_c_1081:31454833
e9c30283:31461165
test_treatment2:31471001
idci7584:31464702
showingstats:31481873
i54ji102:31458073
534a6447:31478749
7ef87755:31458076
chat:31457767
t-some:31486549
cpptoolsoff-v2:31475362
signintitlebar:31487064
db0gd219:31481871
ec1eg703:31488002
ddid_t:31478206
Type: Bug
Blocked from building code by the notification "cl.exe build and debug active file requires the Visual Studio developer environment."
Expected result: code builds
Actual result: Get the failure notification "cl.exe build and debug active file requires the Visual Studio developer environment." This notification offers a button "Apply Developer Environment" but when I go through that step it doesn't help and gives me the additional failure notification "The source code could not be built because the Visual Studio developer environment was not applied."
All support info I find suggests this failure notification is due to not launching VS Code from the Developer Command Prompt, but I have done that.
This is possibly related to #14353 since they are both occurring for me.
If it helps to give you more confidence in my repro steps, I can take a screen recording of all of this and attach the video. Let me know if you'd like me to do that.
Extension version: 1.31.4
VS Code version: Code 1.114.0 (e7fb5e96c0730b9deb70b33781f98e2f35975036, 2026-04-01T09:27:11Z)
OS version: Windows_NT x64 10.0.19045
Modes:
System Info
GPU0: VENDOR= 0x1002, DEVICE=0x677b [AMD Radeon HD 7400 Series], DRIVER_VENDOR=Google, DRIVER_VERSION=8.17.10.1404
GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.19041.5794
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: disabled_software
video_encode: disabled_software
webgl: unavailable_software
webgl2: unavailable_software
webgpu: unavailable_software
webnn: unavailable_software
A/B Experiments