Give users a chance to Input the path of BuildTools\VC#31
Give users a chance to Input the path of BuildTools\VC#31cchangwen wants to merge 1 commit intophp:masterfrom
BuildTools\VC#31Conversation
vswhere.exe return nothing If there is no complete installation of Visual Studio https://visualstudio.microsoft.com/visual-cpp-build-tools/
|
That worked fine for me a couple of years ago (see https://gist.github.com/cmb69/47b8c7fb392f5d79b245c74ac496632c). Is it possible that you have the build tools for vs 17 installed (plus the MSVC v142 tools), but want to build for vs16? This is supported if you call |
|
@cmb69 Just as you said. |
|
In some cases, |
|
Yes, this is a known issue. That part of detection is super strict and uses a range, to avoid finding another Visual Studio installation; this is important if you have multiple versions of Visual Studio installed. See also #29. While offering the possibility to input the path manually (i.e. this PR) is certainly an option, I prefer to apply a local patch for easy of use (I start the php-sdk environments usually quite often). Patch phpsdk-vc15-x64.bat | 2 +-
phpsdk-vc15-x86.bat | 2 +-
phpsdk-vs16-x64.bat | 2 +-
phpsdk-vs16-x86.bat | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/phpsdk-vc15-x64.bat b/phpsdk-vc15-x64.bat
index 5988bdb..12247b3 100755
--- a/phpsdk-vc15-x64.bat
+++ b/phpsdk-vc15-x64.bat
@@ -1,6 +1,6 @@
@echo off
-call %~dp0phpsdk-starter.bat -c vc15 -a x64 %*
+call %~dp0phpsdk-starter.bat -c vc15 -a x64 -s 14.16 %*
exit /b %ERRORLEVEL%
diff --git a/phpsdk-vc15-x86.bat b/phpsdk-vc15-x86.bat
index 3721abe..468cbaf 100755
--- a/phpsdk-vc15-x86.bat
+++ b/phpsdk-vc15-x86.bat
@@ -1,6 +1,6 @@
@echo off
-call %~dp0phpsdk-starter.bat -c vc15 -a x86 %*
+call %~dp0phpsdk-starter.bat -c vc15 -a x86 -s 14.16 %*
exit /b %ERRORLEVEL%
diff --git a/phpsdk-vs16-x64.bat b/phpsdk-vs16-x64.bat
index c0c58e4..07a1652 100755
--- a/phpsdk-vs16-x64.bat
+++ b/phpsdk-vs16-x64.bat
@@ -1,6 +1,6 @@
@echo off
-call %~dp0phpsdk-starter.bat -c vs16 -a x64 %*
+call %~dp0phpsdk-starter.bat -c vs16 -a x64 -s 14.29 %*
exit /b %ERRORLEVEL%
diff --git a/phpsdk-vs16-x86.bat b/phpsdk-vs16-x86.bat
index 5162e0a..d6f07f6 100755
--- a/phpsdk-vs16-x86.bat
+++ b/phpsdk-vs16-x86.bat
@@ -1,6 +1,6 @@
@echo off
-call %~dp0phpsdk-starter.bat -c vs16 -a x86 %*
+call %~dp0phpsdk-starter.bat -c vs16 -a x86 -s 14.29 %*
exit /b %ERRORLEVEL% |
vswhere.exe return nothing If there is no complete installation of Visual Studio https://visualstudio.microsoft.com/visual-cpp-build-tools/