Skip to content

Commit

Permalink
Support command line build in VS2019 (#2048)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK committed Apr 20, 2019
1 parent f80a818 commit a088299
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions Build/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,24 @@ function EnsureNuGetPackage($packageName, $packagePath, $packageVersion)
function GetMsBuildPath()
{
$path = & $vswherePath\tools\vswhere.exe -latest -products * -requires Microsoft.Component.MSBuild -property installationPath
if (!($path)) {
if (!($path))
{
throw "Could not find Visual Studio install path"
}
return join-path $path 'MSBuild\15.0\Bin\MSBuild.exe'

$msBuildPath = join-path $path 'MSBuild\15.0\Bin\MSBuild.exe'
if (Test-Path $msBuildPath)
{
return $msBuildPath
}

$msBuildPath = join-path $path 'MSBuild\Current\Bin\MSBuild.exe'
if (Test-Path $msBuildPath)
{
return $msBuildPath
}

throw "Could not find MSBuild path"
}

function NetCliTests($build)
Expand Down

0 comments on commit a088299

Please sign in to comment.