Closed cmb69 closed 5 years ago
Example session on my machine:
D:\php-sdk\bin>vswhere -nologo -version 15 -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath -format text
installationPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
installationPath: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community
D:\php-sdk\bin>vswhere -nologo -version [15,16) -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath -format text
installationPath: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community
On systems where VS 2017 and VS 2019 are available, the starter script may choose VS 2019 if vc15 is requested. The documentation on vswhere isn't particularly clear regarding the -version parameter, but it states that a version range is expected. Therefore we change the shell setup script accordingly.