diff --git a/build.ps1 b/build.ps1 index b9ac780e70..339dac45fb 100644 --- a/build.ps1 +++ b/build.ps1 @@ -25,9 +25,10 @@ Begin function FindVisualStudio { - if ((Get-Command devenv) -ne $null) + $cmd = Get-Command devenv -ErrorAction:SilentlyContinue + if ($cmd -ne $null) { - $script:devenv = (Get-Command devenv).Source + $script:devenv = $cmd.Source return $true }