Skip to content

Commit

Permalink
Specify the runtime when running 'dotnet restore' in 'Start-PSBuild' (P…
Browse files Browse the repository at this point in the history
…owerShell#6345)

# Conflicts:
#	build.psm1
  • Loading branch information
daxian-dbw authored and TravisEz13 committed Jul 6, 2018
1 parent cf5535c commit 399bc2d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -524,19 +524,19 @@ Fix steps:

# handle Restore
if ($Restore -or -not (Test-Path "$($Options.Top)/obj/project.assets.json")) {
log "Run dotnet restore"

$srcProjectDirs = @($Options.Top, "$PSScriptRoot/src/TypeCatalogGen", "$PSScriptRoot/src/ResGen")
$testProjectDirs = Get-ChildItem "$PSScriptRoot/test/*.csproj" -Recurse | ForEach-Object { [System.IO.Path]::GetDirectoryName($_) }

$RestoreArguments = @("--verbosity")
$RestoreArguments = @("--runtime",$Options.Runtime,"--verbosity")
if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent) {
$RestoreArguments += "detailed"
} else {
$RestoreArguments += "quiet"
}

($srcProjectDirs + $testProjectDirs) | ForEach-Object { Start-NativeExecution { dotnet restore $_ $RestoreArguments } }
$srcProjectDirs | ForEach-Object {
log "Run dotnet restore $_ $RestoreArguments"
Start-NativeExecution { dotnet restore $_ $RestoreArguments }
}
}

# handle ResGen
Expand Down

0 comments on commit 399bc2d

Please sign in to comment.