From 0f04d34ac4254f2ede46840300d1251ac65354d9 Mon Sep 17 00:00:00 2001 From: CW2 Date: Sat, 31 Jul 2021 07:54:03 +0200 Subject: [PATCH] Added Visual Studio build tools (#55629) (#56234) * Added Visual Studio build tools (#55629) Added description of build tools (CMake, Ninja and Python) installation as Visual Studio Individual Components. Added emphasis (bold) of Visual Studio installer sections and components (replaces previously used different styles of quotes). * Removed Python 32-bit VS component Python 64-bit component is enough for building x86 and x64 target architectures. Co-authored-by: Juan Hoyos --- .../requirements/windows-requirements.md | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/docs/workflow/requirements/windows-requirements.md b/docs/workflow/requirements/windows-requirements.md index 2629df320d288..4430e47d7853c 100644 --- a/docs/workflow/requirements/windows-requirements.md +++ b/docs/workflow/requirements/windows-requirements.md @@ -22,21 +22,28 @@ git config --system core.longpaths true - Install [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/). The Community edition is available free of charge. Visual Studio 2019 installation process: -- It's recommended to use 'Workloads' installation approach. The following are the minimum requirements: - - .NET Desktop Development with all default components. - - Desktop Development with C++ with all default components. -- To build for Arm32 or Arm64, make sure that you have the right architecture-specific compilers installed. In the "Individual components" window, in the "Compilers, build tools, and runtimes" section: - - For Arm32, check the box for "MSVC v142 - VS 2019 C++ ARM build tools (v14.23 or newer)". - - For Arm64, check the box for "MSVC v142 - VS 2019 C++ ARM64 build tools (v14.23 or newer)". +- It's recommended to use **Workloads** installation approach. The following are the minimum requirements: + - **.NET Desktop Development** with all default components, + - **Desktop Development with C++** with all default components. +- The build tools (CMake, Ninja and Python) can be downloaded and installed separately (see detailed instructions in the [section below](#build-tools)) or by selecting the following **Individual Components**: + - **C++ CMake tools for Windows** (includes Ninja), + - **Python 3 64-bit** (3.7.4 or newer). +- To build for Arm32 or Arm64, make sure that you have the right architecture-specific compilers installed. In the **Individual components** window, in the **Compilers, build tools, and runtimes** section: + - For Arm32, check the box for **MSVC v142 - VS 2019 C++ ARM build tools (Latest)** (v14.23 or newer), + - For Arm64, check the box for **MSVC v142 - VS 2019 C++ ARM64 build tools (Latest)** (v14.23 or newer). - To build the tests, you will need some additional components: - - Windows 10 SDK component version 10.0.18362 or newer. This component is installed by default as a part of 'Desktop Development with C++' workload. - - C++/CLI support for v142 build tools (v14.23 or newer) + - **Windows 10 SDK (10.0.18362)** or newer. This component is installed by default as a part of **Desktop Development with C++** workload. + - **C++/CLI support for v142 build tools (Latest)** (v14.23 or newer). A `.vsconfig` file is included in the root of the dotnet/runtime repository that includes all components needed to build the dotnet/runtime repository. You can [import `.vsconfig` in your Visual Studio installer](https://docs.microsoft.com/en-us/visualstudio/install/import-export-installation-configurations?view=vs-2019#import-a-configuration) to install all necessary components. Visual Studio 2019 16.6 or later is required for building the repository. Visual Studio 2019 16.10 is required to work with the libraries projects inside the Visual Studio IDE. -## CMake +## Build Tools + +These steps are required only in case the tools have not been installed as Visual Studio **Individual Components** (described above). + +### CMake - Install [CMake](https://cmake.org/download) for Windows. - Add its location (e.g. C:\Program Files (x86)\CMake\bin) to the PATH environment variable. @@ -44,13 +51,13 @@ Visual Studio 2019 16.6 or later is required for building the repository. Visual The dotnet/runtime repository recommends using CMake 3.16.4 or newer, but it may work with CMake 3.15.5. -## Ninja +### Ninja - Install Ninja in one of the two following ways - [Download the executable](https://github.com/ninja-build/ninja/releases) and add its location to [the Default PATH variable](#adding-to-the-default-path-variable). - [Install via a package manager](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages), which should automatically add it to the PATH environment variable. -## Python +### Python - Install [Python](https://www.python.org/downloads/) for Windows. - Add its location (e.g. C:\Python*\) to the PATH environment variable.