Open cchangwen opened 2 months ago
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 phpsdk-starter.bat -c vs16 -a x64 -s 14.29
(i.e. you explicitly pass the -s
option).
@cmb69 Just as you said.
phpsdk-vs16-x64.bat
Could not determine 'vs16' directory
phpsdk-starter.bat -c vs16 -a x64 -s 14.2
[vcvarsall.bat] Environment initialized for: 'x64'
PHP SDK 2.3.0
OS architecture: x64
Build architecture: x64
Visual C++: 14.29.30154.0
PHP-SDK path: d:\php-sdk-binary-tools-php-sdk-2.3.0
In some cases, vswhere. exe
don't output valid information, causing all scripts that depend on it to not work properly.
phpsdk_setshell.bat
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).
vswhere.exe return nothing If there is no complete installation of Visual Studio https://visualstudio.microsoft.com/visual-cpp-build-tools/