Update dotnet-build to produce portable layout

dotnet-build will produce a deps file for portable builds, and will now
create "runnable" outputs for RID-less targets

the outputs won't actually be runnable today because we need corehost
changes and to generate a deps.json file for corehost to use.
This commit is contained in:
Andrew Stanton-Nurse 2016-03-01 17:42:44 -08:00
parent 444e4f9fd7
commit 7cc90d9ad1
22 changed files with 334 additions and 99 deletions

View file

@ -6,11 +6,16 @@
$oldPath = $env:PATH
try {
# Put the stage2 output on the front of the path
$stage2 = "$PSScriptRoot\..\artifacts\win7-x64\stage2\bin"
if(!(Get-Command dotnet -ErrorAction SilentlyContinue)) {
throw "You need to have a version of 'dotnet' on your path so we can determine the RID"
}
$rid = dotnet --version | where { $_ -match "^ Runtime Id:\s*(.*)$" } | foreach { $matches[1] }
$stage2 = "$PSScriptRoot\..\artifacts\$rid\stage2\bin"
if (Test-Path $stage2) {
$env:PATH="$stage2;$env:PATH"
} else {
Write-Host "You don't have a dev build in the 'artifacts\win7-x64\stage2' folder!"
Write-Host "You don't have a dev build in the 'artifacts\$rid\stage2' folder!"
}
dotnet @args