1bf215546Sopenharmony_ci$vsInstallPath=& "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version 16.0 -property installationpath 2bf215546Sopenharmony_ciWrite-Output "vswhere.exe installPath: $vsInstallPath" 3bf215546Sopenharmony_ci$vsInstallPath = if ("$vsInstallPath" -eq "" ) { "C:\BuildTools" } else { "$vsInstallPath" } 4bf215546Sopenharmony_ciWrite-Output "Final installPath: $vsInstallPath" 5bf215546Sopenharmony_ciImport-Module (Join-Path $vsInstallPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll") 6bf215546Sopenharmony_ci# https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B 7bf215546Sopenharmony_ci# VS2015 14.0 8bf215546Sopenharmony_ci# VS2017 14.16 9bf215546Sopenharmony_ci# VS2019 14.29 10bf215546Sopenharmony_ci# VS2022 14.32 11bf215546Sopenharmony_ciEnter-VsDevShell -VsInstallPath $vsInstallPath -SkipAutomaticLocation -DevCmdArguments '-vcvars_ver=14.29 -arch=x64 -no_logo -host_arch=amd64' 12