doc: update Windows MSVC build guide to utilize WinGet to install apps
What changed, and why it matters
This commit only updates the Windows build instructions document. It replaces manual download steps with commands using WinGet, a Microsoft package manager, and renumbers some sections. There are no code changes and no security implications.
No security action needed. This is a routine documentation update.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is limited to doc/build-windows-msvc.md. It restructures the preparation section to use winget install for Visual Studio Community (with workload overrides) and Python, removes the standalone Git installation step in favor of the Visual Studio Git component, and renumbers/renames subsequent sections. No source code, build scripts, dependencies, or cryptographic logic is modified.
Changed components
doc/build-windows-msvc.mdInspect captured patch +41 / −17
diff --git a/doc/build-windows-msvc.md b/doc/build-windows-msvc.md
index 17adb779..86639396 100644
--- a/doc/build-windows-msvc.md
+++ b/doc/build-windows-msvc.md
@@ -6,25 +6,49 @@ For cross-compiling options, please see [`build-windows.md`](./build-windows.md)
## Preparation
-### 1. Visual Studio
+### 1. Install Required Dependencies
+
+The first step is to install the required build applications. The instructions below use WinGet to install the applications.
+
+WinGet is available on all supported Windows versions. The applications mentioned can also be installed manually.
+
+#### Visual Studio
This guide relies on using CMake and vcpkg package manager provided with the Visual Studio installation.
-Here are requirements for the Visual Studio installation:
-1. Minimum required version: Visual Studio 2026 version 18.3.
-2. Installed components:
-- The "Desktop development with C++" workload.
-The commands in this guide should be executed in "Developer PowerShell for VS" or "Developer Command Prompt for VS".
+Minimum required version: Visual Studio 2026 version 18.3 with the "Desktop development with C++" workload.
+
+To install Visual Studio Community Edition with the necessary components, run:
+
+```powershell
+winget install --id Microsoft.VisualStudio.Community --override "--wait --quiet --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.Git --includeRecommended"
+```
+
+This installs:
+- Visual Studio
+- The "Desktop development with C++" workload (NativeDesktop)
+- Git component
+
+After installation, the commands in this guide should be executed in "Developer PowerShell for VS" or "Developer Command Prompt for VS".
The former is assumed hereinafter.
-### 2. Git
+#### Python
-Download and install [Git for Windows](https://git-scm.com/downloads/win). Once installed, Git is available from PowerShell or the Command Prompt.
+Python is required for running the test suite.
-### 3. Clone Bitcoin Repository
+To install Python, run:
-Clone the Bitcoin Core repository to a directory. All build scripts and commands will run from this directory.
+```powershell
+winget install python3
```
+
+### 2. Clone Bitcoin Repository
+
+`git` should already be installed as a component of Visual Studio. If not, download and install [Git for Windows](https://git-scm.com/downloads/win).
+
+Clone the Bitcoin Core repository to a directory. All build scripts and commands will run from this directory.
+
+```powershell
git clone https://github.com/bitcoin/bitcoin.git
```
@@ -38,7 +62,7 @@ The Bitcoin Core project supports the following vcpkg triplets:
To facilitate build process, the Bitcoin Core project provides presets, which are used in this guide.
Available presets can be listed as follows:
-```
+```powershell
cmake --list-presets
```
@@ -52,7 +76,7 @@ In the following instructions, the "Debug" configuration can be specified instea
Run `cmake -B build -LH` to see the full list of available options.
-### 4. Building with Static Linking with GUI
+### Building with Static Linking with GUI
```powershell
cmake -B build --preset vs2026-static # It might take a while if the vcpkg binary cache is unpopulated or invalidated.
@@ -61,7 +85,7 @@ ctest --test-dir build --build-config Release # Append "-j N" for N parallel te
cmake --install build --config Release # Optional.
```
-### 5. Building with Dynamic Linking without GUI
+### Building with Dynamic Linking without GUI
```powershell
cmake -B build --preset vs2026 -DBUILD_GUI=OFF # It might take a while if the vcpkg binary cache is unpopulated or invalidated.
@@ -69,7 +93,7 @@ cmake --build build --config Release # Append "-j N" for N parallel jo
ctest --test-dir build --build-config Release # Append "-j N" for N parallel tests.
```
-### 6. vcpkg-specific Issues and Workarounds
+### vcpkg-specific Issues and Workarounds
vcpkg installation during the configuration step might fail for various reasons unrelated to Bitcoin Core.
@@ -92,16 +116,16 @@ cmake -B build --preset vs2026-static -DVCPKG_INSTALLED_DIR="C:\path_without_spa
## Performance Notes
-### 7. vcpkg Manifest Default Features
+### vcpkg Manifest Default Features
One can skip vcpkg manifest default features to speed up the configuration step.
For example, the following invocation will skip all features except for "wallet" and "tests" and their dependencies:
-```
+```powershell
cmake -B build --preset vs2026 -DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="wallet;tests" -DBUILD_GUI=OFF -DWITH_ZMQ=OFF
```
Available features are listed in the [`vcpkg.json`](/vcpkg.json) file.
-### 8. Antivirus Software
+### Antivirus Software
To improve the build process performance, one might add the Bitcoin repository directory to the Microsoft Defender Antivirus exclusions.
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.