Skip to content

Commit

Permalink
Added Visual Studio build tools (#55629) (#56234)
Browse files Browse the repository at this point in the history
* 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 <juan.hoyos@microsoft.com>
  • Loading branch information
cw2 and hoyosjs authored Jul 31, 2021
1 parent b0cb96e commit 0f04d34
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions docs/workflow/requirements/windows-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,42 @@ 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.
The installation script has a check box to do this, but you can do it yourself after the fact following the instructions at [Adding to the Default PATH variable](#adding-to-the-default-path-variable).

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.
Expand Down

0 comments on commit 0f04d34

Please sign in to comment.