From e4bbd3fe395880ce82654cf6907ef606b943f329 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Thu, 8 Mar 2018 11:37:50 -0800 Subject: [PATCH] [Package] Specify the runtime when running 'dotnet restore' --- build.psm1 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/build.psm1 b/build.psm1 index 912cb0455ce..a0e6a86dd11 100644 --- a/build.psm1 +++ b/build.psm1 @@ -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 } }