Skip to content

Commit

Permalink
build.ps1 - Improve vswhere programfiles check
Browse files Browse the repository at this point in the history
  • Loading branch information
amaitland committed Oct 14, 2021
1 parent 221185b commit f904b88
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,13 @@ DownloadNuget

NugetPackageRestore $VCXProjPackageConfigFiles

$ProgramFilesDir = (${env:ProgramFiles(x86)}, ${env:ProgramFiles} -ne $null)[0]
$VSWherePath = Join-Path ${env:ProgramFiles} 'Microsoft Visual Studio\Installer\vswhere.exe'

if(-not (Test-Path $VSWherePath))
{
$VSWherePath = Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio\Installer\vswhere.exe'
}

$VSWherePath = Join-Path $ProgramFilesDir 'Microsoft Visual Studio\Installer\vswhere.exe'
#Check if we already have vswhere which is included in newer versions of VS2017/VS2019
if(-not (Test-Path $VSWherePath))
{
Expand Down

0 comments on commit f904b88

Please sign in to comment.