microsoft / microsoft/vscode-cmake-tools

select vc toolset minor version error

Open
#4,316 7 comments 0 reactions 0 assignees View on GitHub
bug Feature: kits
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

### Brief Issue Summary

1、I installed tooset 14.38 and 14.42

Image

2、 default is 14.38

Image

Image

3、cmake tools call vcvarsall.bat and save only this table's var but diff from direct run vcvarscall.bat -vcvars_ver=14.42, don't have VSCMD_VER env var, so when CMake Tools set vars, and call cmake -T version=14.42 ,default is vars 14.38, and use 38, do not clear by msbuild , error come out

Image

4、cmake tools do not clean env vars,this why select minor toolset version error
Image

5、sample

Image

6、you can install double toolset like this ,(also see https://gitlab.kitware.com/cmake/cmake/-/issues/25192#note_1534143)

Image

7、you can run vcvarscall.bat(default is 14.38). and unset env VSCMD_VER, then cmake -T version=14.42... bug behavior like cmake tools

### CMake Tools Diagnostics

```shell

```

### Debug Log

```shell

```

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the setup with Visual C++ toolsets 14.38 and 14.42 installed, comparing direct vcvarsall.bat -vcvars_ver=14.42 with the environment captured by CMake Tools. Inspect the CMake Tools toolset-selection path and the handling of VSCMD_VER and related variables. Done means cmake -T version=14.42 uses the requested minor toolset without stale environment variables.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, typescript
Domain
build-system, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.