Skip to content

Commit d0034d4

Browse files
committed
Ever more complicated instructions.
1 parent 4008b0c commit d0034d4

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Documentation/developer-setup-windows-gotchas.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,12 @@ The solution here is to explicitly install the version of the build tools that y
8585

8686
You may have different projects that need to use different compiler versions. If you use Visual Studio Code, the easiest way to deal with this is to set up custom "kits" for the different versions.
8787

88-
Open the command palette (Ctrl-Shift-P) and choose `CMake: Edit User-Local CMake Kits`. Make two copies of the JSON object for the existing `amd64` kit. It will have a name similar to `Visual Studio Professional 2022 Release - amd64`. Name the two copies for the compiler version you want each to use, such as `14.38 - Visual Studio Professional 2022 Release - amd64`. Then, add the version to the `preferredGenerator.toolset` property. It should look like this (though your names and `visualStudio` properties may be different):
88+
Open the command palette (Ctrl-Shift-P) and choose `CMake: Edit User-Local CMake Kits`. Make two copies of the JSON object for the existing `amd64` kit. It will have a name similar to `Visual Studio Professional 2022 Release - amd64`. Name the two copies for the compiler version you want each to use, such as `14.38 - Visual Studio Professional 2022 Release - amd64`. Then, do the following:
89+
90+
* Add the `version=14.38` or similar to the `preferredGenerator.toolset` property.
91+
* Create an entry for the `VCToolsVersion` environment variable with the full three-part version. You can find the three-part version for your installed toolsets by looking in `C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC` or similar.
92+
93+
It should look like this (though your names and `visualStudio` properties may be different):
8994

9095
```json
9196
[
@@ -98,6 +103,9 @@ Open the command palette (Ctrl-Shift-P) and choose `CMake: Edit User-Local CMake
98103
"name": "Visual Studio 17 2022",
99104
"platform": "x64",
100105
"toolset": "host=x64,version=14.38"
106+
},
107+
"environmentVariables": {
108+
"VCToolsVersion": "14.38.33130"
101109
}
102110
},
103111
{
@@ -109,6 +117,9 @@ Open the command palette (Ctrl-Shift-P) and choose `CMake: Edit User-Local CMake
109117
"name": "Visual Studio 17 2022",
110118
"platform": "x64",
111119
"toolset": "host=x64,version=14.44"
120+
},
121+
"environmentVariables": {
122+
"VCToolsVersion": "14.44.35207"
112123
}
113124
},
114125
...

0 commit comments

Comments
 (0)