mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Specify the runtime when running 'dotnet restore' in 'Start-PSBuild' (#6345)
# Conflicts: # build.psm1
This commit is contained in:
committed by
Travis Plunk
parent
cf5535c571
commit
399bc2d30a
+5
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user