Skip to content

Commit

Permalink
Revert explicit path on msbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
david1995 committed Oct 1, 2018
1 parent cb82729 commit 0399297
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions build.vs2015.ps1
Expand Up @@ -2,23 +2,23 @@ param (
[string]$Configuration = "Debug"
)

$msbuildPath = "C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe"
#$msbuildPath = "C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe"
$msbuildPath = "msbuild"


# if ([Environment]::OSVersion.Platform -eq "Win32NT"){
# $vswherePath = [System.Environment]::ExpandEnvironmentVariables("%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe")
# $vswhereParameters = @("-latest", "-products", "*", "-requires", "Microsoft.Component.MSBuild", "-property", "installationPath")
if ([Environment]::OSVersion.Platform -eq "Win32NT"){
$vswherePath = [System.Environment]::ExpandEnvironmentVariables("%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe")
$vswhereParameters = @("-latest", "-products", "*", "-requires", "Microsoft.Component.MSBuild", "-property", "installationPath")

# $vsPath = & $vswherePath $vswhereParameters
$vsPath = & $vswherePath $vswhereParameters

# Write-Host $path
Write-Host $path

# if ($vsPath) {
# $msbuildPath = join-path $vsPath 'MSBuild\15.0\Bin\MSBuild.exe'
# }
if ($vsPath) {
$msbuildPath = join-path $vsPath 'MSBuild\15.0\Bin\MSBuild.exe'
}

# Write-Host $msbuildPath
# }
Write-Host $msbuildPath
}

& nuget restore ./SpecFlow.VisualStudio.2015.sln
& $msbuildPath /Restore ./SpecFlow.VisualStudio.2015.sln /property:Configuration=$Configuration /binaryLogger:msbuild.$Configuration.binlog /nodeReuse:false

0 comments on commit 0399297

Please sign in to comment.