Skip to content

Commit

Permalink
Fix build script for x86
Browse files Browse the repository at this point in the history
  • Loading branch information
zhili1208 committed Nov 7, 2016
1 parent e71e012 commit 084d8bd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions build/common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ Set-Alias nuget $NuGetExe
Set-Alias xunit $XunitConsole
Set-Alias ilmerge $ILMerge

$Version = New-Object -TypeName System.Version -ArgumentList "4.0"

if ($PSVersionTable.PSVersion.CompareTo($Version) -le 0) {
Set-Alias wget Invoke-WebRequest
}

Function Read-PackageSources {
param($NuGetConfig)
$xml = New-Object xml
Expand Down
8 changes: 7 additions & 1 deletion configure.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,13 @@ Function New-BuildToolset {
$ToolsetObject
}

$MSBuildDefaultRoot = Join-Path ${env:ProgramFiles(x86)} MSBuild
$ProgramFiles = ${env:ProgramFiles(x86)}

if (-not $ProgramFiles -or -not (Test-Path $ProgramFiles)) {
$ProgramFiles = $env:ProgramFiles
}

$MSBuildDefaultRoot = Join-Path $ProgramFiles MSBuild
$MSBuildRelativePath = 'bin\msbuild.exe'

Invoke-BuildStep 'Validating VS14 toolset installation' {
Expand Down

0 comments on commit 084d8bd

Please sign in to comment.