From 45ad2d9e331a114bfe910cf7d21b9c986f1b094a Mon Sep 17 00:00:00 2001 From: Doug Bunting <6431421+dougbu@users.noreply.github.com> Date: Fri, 25 Jun 2021 15:58:35 -0700 Subject: [PATCH] [release/5.0] Fix strict-mode break - use `Get-Member` instead of assuming `$null` property value - fixes build break I caused in 0214a32e5fce --- eng/common/tools.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 4b44f44913b..eba7ed49d78 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -373,7 +373,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = $msbuildVersionDir = if ([int]$vsMajorVersion -lt 16) { "$vsMajorVersion.0" } else { "Current" } $local:BinFolder = Join-Path $vsInstallDir "MSBuild\$msbuildVersionDir\Bin" - $local:Prefer64bit = if ($vsRequirements.Prefer64bit) { $vsRequirements.Prefer64bit } else { $false } + $local:Prefer64bit = if (Get-Member -InputObject $vsRequirements -Name 'Prefer64bit') { $vsRequirements.Prefer64bit } else { $false } if ($local:Prefer64bit -and (Test-Path(Join-Path $local:BinFolder "amd64"))) { $global:_MSBuildExe = Join-Path $local:BinFolder "amd64\msbuild.exe" } else {