Skip to content

Download Command ​

The download command downloads MSVC compiler and/or Windows SDK from Microsoft servers.

Basic Usage ​

bash
# Download latest MSVC and Windows SDK
msvc-kit download

Options ​

Version Selection ​

You can specify versions using either short or full format:

bash
# Short version (recommended) - automatically resolves to latest build
msvc-kit download --msvc-version 14.44

# Full version - specific build number
msvc-kit download --msvc-version 14.44.34823

# SDK version (always use full format)
msvc-kit download --sdk-version 10.0.26100.0

# Both
msvc-kit download --msvc-version 14.44 --sdk-version 10.0.26100.0

Version Format:

ComponentShort FormatFull FormatExample
MSVC14.4414.44.34823--msvc-version 14.44
SDKN/A10.0.26100.0--sdk-version 10.0.26100.0

When using short MSVC version (e.g., 14.44), msvc-kit automatically resolves it to the latest available build number (e.g., 14.44.34823).

Version Compatibility Guide ​

MSVC and Windows SDK Pairing ​

TL;DR: Use the latest versions of both for best compatibility. They are designed to work together.

ScenarioRecommended MSVCRecommended SDKNotes
General DevelopmentLatest (14.44)Latest (10.0.26100.0)Best compatibility and features
Windows 11 Apps14.42+10.0.22621.0+Win11 SDK required for Win11-specific APIs
Windows 10 SupportAny10.0.19041.0+Older SDKs still work
Legacy ProjectsMatch project's VS versionMatch project's SDKSee version mapping below

MSVC Version ↔ Visual Studio Mapping ​

MSVC ToolsetVisual Studio_MSC_VERSupport Status
14.44VS 2022 17.14+1944Current
14.43VS 2022 17.131943Supported
14.42VS 2022 17.121942Supported
14.41VS 2022 17.111941Supported
14.40VS 2022 17.101940Supported
14.39VS 2022 17.91939Supported
14.38VS 2022 17.8 (LTSC)1938Long-term support

Windows SDK Version ↔ Windows Version ​

SDK VersionTarget WindowsCodenameNotes
10.0.26100.0Windows 11 24H2Latest, recommended
10.0.22621.0Windows 11 22H2Stable, widely used
10.0.22000.0Windows 11 21H2First Win11 SDK
10.0.19041.0Windows 10 2004Good Win10 baseline
10.0.18362.0Windows 10 1903Legacy support

Common Combinations ​

bash
# Recommended: Latest everything (best for new projects)
msvc-kit download --msvc-version 14.44 --sdk-version 10.0.26100.0

# Stable: Widely tested combination
msvc-kit download --msvc-version 14.42 --sdk-version 10.0.22621.0

# Windows 10 focused: Maximum compatibility
msvc-kit download --msvc-version 14.40 --sdk-version 10.0.19041.0

Important Notes ​

  1. Forward Compatibility: Newer MSVC versions can target older Windows versions. Use _WIN32_WINNT macro to control target.

  2. SDK Selection: The SDK version determines which Windows APIs are available at compile time, not runtime compatibility.

  3. ABI Compatibility: MSVC 14.x toolsets (VS 2015-2022) share the same C++ ABI, so libraries built with 14.40 work with 14.44.

  4. When in Doubt: Use the latest versions. Microsoft ensures backward compatibility.

Component Selection ​

bash
# Download only MSVC (skip SDK)
msvc-kit download --no-sdk

# Download only SDK (skip MSVC)
msvc-kit download --no-msvc

Target Directory ​

bash
# Custom installation directory
msvc-kit download --target C:\msvc-kit

Architecture ​

bash
# Target architecture (default: x64)
msvc-kit download --arch x64

Supported architectures:

  • x64 - 64-bit x86
  • x86 - 32-bit x86
  • arm64 - ARM64
  • arm - ARM 32-bit (target only)

The host architecture is detected from the running machine and cannot be overridden on download; msvc-kit download always fetches the cross-compiler that matches the host. msvc-kit bundle --host-arch <arch> is the only command that takes an explicit host architecture.

Visual Studio Channel ​

Packages are discovered from a Visual Studio channel manifest. By default msvc-kit uses the newest channel that serves a manifest; pin one to stay on a specific Visual Studio release:

bash
# Pin by major version or release year
msvc-kit download --vs-channel 17
msvc-kit download --vs-channel 2022

# Environment variable / configuration
MSVC_KIT_VS_CHANNEL=17 msvc-kit download
msvc-kit config --set-vs-channel 2022

See Visual Studio Versions & Channels for the full list and for how to add a new release.

Component Selection (Optional Extras) ​

bash
# Add optional MSVC components (repeatable)
msvc-kit download --include-component spectre --include-component mfc

# Exclude packages whose id contains a pattern (case-insensitive, repeatable)
msvc-kit download --exclude-pattern spectre

--include-component accepts spectre, mfc, atl, asan, uwp, cli, modules, redist and custom:<pattern>. The standard toolchain (Tools, CRT, MFC, ATL) is always downloaded; these flags only add or remove packages on top of it.

Download Options ​

bash
# Parallel downloads (default: 4)
msvc-kit download --parallel-downloads 8

# Skip hash verification (not recommended)
msvc-kit download --no-verify

Full Example ​

bash
msvc-kit download \
  --msvc-version 14.44 \
  --sdk-version 10.0.26100.0 \
  --target C:\msvc-kit \
  --arch x64 \
  --parallel-downloads 8

Download Progress ​

The download shows progress for each package:

Downloading MSVC packages...
[1/15] Microsoft.VC.14.44.17.14.CRT.Headers.x64 (2.3 MB)
[2/15] Microsoft.VC.14.44.17.14.CRT.Source (1.1 MB)
...

Caching Behavior ​

Downloads are cached and skipped if already present:

StatusMeaning
cachedFile exists in index with matching hash
304Server returned Not Modified (ETag match)
size matchFile size matches expected (best-effort)

To force re-download, use msvc-kit clean --cache first.

Available Versions ​

List available versions before downloading:

bash
msvc-kit list --available

Output:

Available MSVC versions:
  14.44.34823
  14.43.34808
  14.42.34433
  ...

Available SDK versions:
  10.0.26100.0
  10.0.22621.0
  10.0.22000.0
  ...

Released under the MIT License.