From 399bc2d30a37b4523cf66d993b9a70fbf9cb01fc Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Thu, 8 Mar 2018 14:25:39 -0800 Subject: [PATCH] Specify the runtime when running 'dotnet restore' in 'Start-PSBuild' (#6345) # Conflicts: # build.psm1 --- build.psm1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build.psm1 b/build.psm1 index eded9139e2..ef6da73704 100644 --- a/build.psm1 +++ b/build.psm1 @@ -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