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)
This commit is contained in:
+3
-4
@@ -526,17 +526,16 @@ Fix steps:
|
||||
|
||||
# handle Restore
|
||||
if ($Restore -or -not (Test-Path "$($Options.Top)/obj/project.assets.json")) {
|
||||
$srcProjectDirs = @($Options.Top, "$PSScriptRoot/src/TypeCatalogGen", "$PSScriptRoot/src/ResGen", "$PSScriptRoot/src/Modules/PSGalleryModules.csproj")
|
||||
$testProjectDirs = Get-ChildItem "$PSScriptRoot/test/*.csproj" -Recurse | ForEach-Object { [System.IO.Path]::GetDirectoryName($_) }
|
||||
$srcProjectDirs = @($Options.Top, "$PSScriptRoot/src/TypeCatalogGen", "$PSScriptRoot/src/ResGen", "$PSScriptRoot/src/Modules")
|
||||
|
||||
$RestoreArguments = @("--verbosity")
|
||||
$RestoreArguments = @("--runtime",$Options.Runtime,"--verbosity")
|
||||
if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent) {
|
||||
$RestoreArguments += "detailed"
|
||||
} else {
|
||||
$RestoreArguments += "quiet"
|
||||
}
|
||||
|
||||
($srcProjectDirs + $testProjectDirs) | ForEach-Object {
|
||||
$srcProjectDirs | ForEach-Object {
|
||||
Write-Log "Run dotnet restore $_ $RestoreArguments"
|
||||
Start-NativeExecution { dotnet restore $_ $RestoreArguments }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user