From 8ed18b224ad14799992465010a7e5ab46a6fa16a Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Thu, 18 Jul 2024 23:36:15 +0800 Subject: [PATCH] Only visual studio 2015 neesd fixes the windows sdk path (#3837) Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com> --- CHANGELOG.md | 1 + src/installs/visualStudio.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2000bd3a1..a6f8e27cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ Bug Fixes: - Fix the bug where if a relative path specified for `installDir`, it is not calculated relative to the source directory, which is how it should be according to the CMake `installDir` docs [here](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#configure-preset). [#3871](https://github.com/microsoft/vscode-cmake-tools/issues/3871) - Fix issue with CMakeLists.txt depth search. [#3901](https://github.com/microsoft/vscode-cmake-tools/issues/3901) - Fix localized file path for schema files. [#3872](https://github.com/microsoft/vscode-cmake-tools/issues/3872) +- Disable annoy and invalid extenion message about fix windows sdk for MSVC 2022. [#3837](https://github.com/microsoft/vscode-cmake-tools/pull/3837) ## 1.18.43 diff --git a/src/installs/visualStudio.ts b/src/installs/visualStudio.ts index 3fe1830d7..430ead253 100644 --- a/src/installs/visualStudio.ts +++ b/src/installs/visualStudio.ts @@ -407,7 +407,7 @@ async function collectDevBatVars(hostArch: string, devBat: string, args: string[ } catch (err) { log.error(`Parse '${WindowsSDKVersion}' failed`); } - if (util.compareVersion(WindowsSDKVersionParsed, { major: 10, minor: 0, patch: 14393 }) >= 0) { + if (majorVersion === 14 && util.compareVersion(WindowsSDKVersionParsed, { major: 10, minor: 0, patch: 14393 }) >= 0) { const WindowsSdkDir = vars['WindowsSdkDir'] ?? ''; const existPath = vars['PATH'] ?? ''; const oldWinSdkBinPath = path.join(WindowsSdkDir, 'bin', hostArch);