vscode-cmake-tools icon indicating copy to clipboard operation
vscode-cmake-tools copied to clipboard

select vc toolset minor version error

Open debugee opened this issue 1 year ago • 7 comments

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


Debug Log


Additional Information

No response

debugee avatar Mar 02 '25 15:03 debugee

can fix this bug

debugee avatar Mar 03 '25 06:03 debugee

@debugee One thing that I would suggest is switching to CMakePresets.json and using the toolset identifier in the CMakePresets file in order to workaround this issue. However, this does seem like a bug. We prioritize CMakePresets work, but we will put this on the backlog to investigate and fix. Thanks!

gcampbell-msft avatar Mar 03 '25 12:03 gcampbell-msft

@debugee One thing that I would suggest is switching to CMakePresets.json and using the toolset identifier in the CMakePresets file in order to workaround this issue. However, this does seem like a bug. We prioritize CMakePresets work, but we will put this on the backlog to investigate and fix. Thanks!

preset我用过,preset确实是正常的。这确实是个错误,cmake tools 不会重置vctoolsversion

debugee avatar Mar 03 '25 13:03 debugee

Hi @debugee , our dev has put this on the backlog to investigate and fix. Thanks for help us build a better CMake Tools!

Amy-Li03 avatar Mar 05 '25 08:03 Amy-Li03

Hi @debugee , our dev has put this on the backlog to investigate and fix. Thanks for help us build a better CMake Tools!

cmake tools is a nice tool,I like it

debugee avatar Mar 05 '25 11:03 debugee

Hi @debugee , our dev has put this on the backlog to investigate and fix. Thanks for help us build a better CMake Tools!

这个问题修复了吗?

debugee avatar Aug 27 '25 22:08 debugee

Hi @debugee , thank you for your report. This issue remains on the backlog to investigate and fix. Thanks!

yanghhhhhhh avatar Aug 28 '25 06:08 yanghhhhhhh