Minimum C/C++ MSVC build environment in Windows

It will only use disk space less than 1G.

At the first, we need VScode, MSVC and Windows SDK. I use vcpython27, which contains MSVC and Windows SDK for minimality.

You can download these applications through the below links.

We can't inherit the build environment from the global environment instead of using "Visual C++ 2008 64-bit Command Prompt". Then run "code", or "code ." in the directory where your project is.

Finally, configure ".vscode\launch.json", ".vscode\tasks.json", ".vscode\c_cpp_properties.json" like below.


    "configurations": [
            "name": "Win32",
            "includePath": [
                "C:\\Users\\User\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\include",
                "C:\\Users\\User\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\WinSDK\\Include"
            "defines": [
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "windows-msvc-x64"
    "version": 4


    // See
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
            "label": "cl-build",
            "type": "shell",
            "command": "cl /Zi test.c",
            "problemMatcher": [],
            "group": {
                "kind": "build",
                "isDefault": true


    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit:
    "version": "0.2.0",
    "configurations": [

            "name": "(Windows) Launch",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "${workspaceFolder}/test.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "console": "externalTerminal",
            "preLaunchTask": "cl-build"