summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/detect/sdks/find_vstudio.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/detect/sdks/find_vstudio.lua b/xmake/modules/detect/sdks/find_vstudio.lua
index d908bcc5a..9af9fb730 100644
--- a/xmake/modules/detect/sdks/find_vstudio.lua
+++ b/xmake/modules/detect/sdks/find_vstudio.lua
@@ -223,7 +223,7 @@ function main(opt)
VCInstallDir
}
local vcvarsall = find_file("vcvarsall.bat", paths) or find_file("vcvars32.bat", paths)
- if vcvarsall and os.isfile(vcvarsall) then
+ if vcvarsall and os.isfile(vcvarsall) and vsvers[VisualStudioVersion] then
-- load vcvarsall
local vcvarsall_x86 = _load_vcvarsall(vcvarsall, VisualStudioVersion, "x86", opt)