You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation/developer-setup-windows-gotchas.md
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,12 @@ The solution here is to explicitly install the version of the build tools that y
85
85
86
86
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.
87
87
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):
89
94
90
95
```json
91
96
[
@@ -98,6 +103,9 @@ Open the command palette (Ctrl-Shift-P) and choose `CMake: Edit User-Local CMake
98
103
"name": "Visual Studio 17 2022",
99
104
"platform": "x64",
100
105
"toolset": "host=x64,version=14.38"
106
+
},
107
+
"environmentVariables": {
108
+
"VCToolsVersion": "14.38.33130"
101
109
}
102
110
},
103
111
{
@@ -109,6 +117,9 @@ Open the command palette (Ctrl-Shift-P) and choose `CMake: Edit User-Local CMake
0 commit comments