Getting MSVC up and running takes only a few minutes with the Visual Studio Installer. The installer uses a workload-based model, meaning you select high-level capability bundles (like “Desktop development with C++”) and it handles all the underlying component dependencies automatically. You can add or remove workloads at any time after the initial install. This guide walks through a full installation of Visual Studio 2022 with C++ support.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/MicrosoftDocs/cpp-docs/llms.txt
Use this file to discover all available pages before exploring further.
This guide covers Visual Studio on Windows. If you want a lightweight, cross-platform editor instead, see Visual Studio Code with the C/C++ extension. Visual Studio for Mac does not support Microsoft C++.
Before You Begin
Make sure your system meets the requirements and is in a clean state before starting the install:- Check the Visual Studio 2022 system requirements.
- Apply all pending Windows Updates and reboot your computer before installing.
- Free up disk space — a typical C++ installation requires 6–10 GB; a full install with all workloads can exceed 50 GB.
- Visual Studio 2022 can be installed side-by-side with Visual Studio 2019 or 2017.
Installation Steps
Download Visual Studio
Go to the Visual Studio download page and choose your edition:
- Community — Free for individuals, open-source, students, and classroom use.
- Professional — For small teams and professional developers.
- Enterprise — For large organizations requiring advanced testing and architectural tools.
VisualStudioSetup.exe.Run the Bootstrapper
Locate
VisualStudioSetup.exe in your Downloads folder and double-click it. If a User Account Control dialog appears, click Yes to allow the installer to run.The bootstrapper downloads and launches the Visual Studio Installer — a lightweight app that manages all future installs, updates, and modifications. Accept the Microsoft License Terms and Privacy Statement to continue.Select the C++ Workload
The installer presents a list of workloads — curated collections of components for specific development scenarios. For C++ development, select:Desktop development with C++This workload installs:
- MSVC v143 compiler and build tools
- Windows 11 SDK (latest)
- C++ core desktop features
- C++ CMake tools for Windows
- C++ AddressSanitizer
- The Visual Studio debugger with native C++ support
Add Optional Components
Inside the Desktop development with C++ workload, you can select additional optional components. Common choices include:
C++ CMake tools for Windows
C++ CMake tools for Windows
Already included by default in VS 2022. Provides full CMake integration: open any folder containing a
CMakeLists.txt and Visual Studio configures IntelliSense and build targets automatically.MSVC v141 / v142 (Older Toolsets)
MSVC v141 / v142 (Older Toolsets)
Install previous toolset versions (Visual Studio 2017 v141 or 2019 v142) to build projects that require older ABI compatibility. You can then set the Platform Toolset per-project in Properties.
C++ Clang tools for Windows
C++ Clang tools for Windows
Installs Clang/LLVM as an alternative compiler front-end. Useful for cross-platform projects that also build with Clang on Linux or macOS, or for leveraging Clang-specific sanitizers.
Linux and embedded development with C++
Linux and embedded development with C++
A separate workload — scroll down to find it. Required for building C++ code that runs on Linux machines or WSL. See the Linux Tutorial for details.
Game development with C++
Game development with C++
Adds integration with DirectX, Unreal Engine, and Cocos2d. Select this if you are building Windows or Xbox games.
Choose an Installation Location (Optional)
By default, Visual Studio installs to
C:\Program Files\Microsoft Visual Studio\2022\. You can move the download cache, shared components, and SDKs to different drives via the Installation locations tab. The IDE itself should remain on your fastest drive.Install
Click the Install button. The installer downloads and installs all selected components. Progress is shown in real time. Installation time varies depending on your internet speed and selected components — typically 10–20 minutes for a standard C++ install.You can continue using your computer during installation. Visual Studio does not need to be running during download.
Launch and Configure Visual Studio
When installation completes, click Launch. On first run:
- Sign in with a Microsoft Account (optional, but required after 30 days for Community edition and needed for GitHub Copilot).
- Choose a color theme (Dark, Light, or Blue). You can change this later in Tools > Options > Environment > General.
- Visual Studio finishes loading its component catalog — this may take a minute the first time.
Verify Your Installation
To confirm C++ support is working, create a quick test project:A successful build confirms the compiler, linker, and Windows SDK are all correctly installed.
- Click Create a new project on the Start Window.
- In the search box, type
Console Appand select the template tagged C++, Windows, Console. - Name the project
TestInstalland click Create. - Press Ctrl+Shift+B to build. The Output window should show:
Adding or Removing Workloads Later
You can modify your installation at any time without reinstalling from scratch:- Open the Visual Studio Installer from the Windows Start menu.
- Click Modify next to your Visual Studio installation.
- Check or uncheck workloads and individual components.
- Click Modify to apply changes.
Installing the Standalone Build Tools
If you only need the compiler and build system (for CI/CD pipelines, servers, or minimal developer machines without the IDE), download the Microsoft C++ Build Tools from visualstudio.microsoft.com/visual-cpp-build-tools. The Build Tools installer uses the same workload model and installscl.exe, link.exe, MSBuild, and the Windows SDK without the IDE.