diff --git a/build_projects/Microsoft.DotNet.Cli.Build.Framework/project.json b/build_projects/Microsoft.DotNet.Cli.Build.Framework/project.json index c9c28d972..ecbb0e364 100644 --- a/build_projects/Microsoft.DotNet.Cli.Build.Framework/project.json +++ b/build_projects/Microsoft.DotNet.Cli.Build.Framework/project.json @@ -15,7 +15,7 @@ "System.Reflection.TypeExtensions": "4.1.0-rc3-24123-01" }, "frameworks": { - "netstandard1.6": { + "netstandard1.5": { "imports": "dnxcore50" } } diff --git a/build_projects/dotnet-cli-build/build.ps1 b/build_projects/dotnet-cli-build/build.ps1 index 059de470d..21030843b 100644 --- a/build_projects/dotnet-cli-build/build.ps1 +++ b/build_projects/dotnet-cli-build/build.ps1 @@ -68,7 +68,7 @@ $env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH" # Restore the build scripts Write-Host "Restoring Build Script projects..." pushd "$PSScriptRoot\.." -dotnet restore --infer-runtimes +dotnet restore if($LASTEXITCODE -ne 0) { throw "Failed to restore" } popd diff --git a/build_projects/dotnet-cli-build/build.sh b/build_projects/dotnet-cli-build/build.sh index 1ef8f7ca1..412013fef 100755 --- a/build_projects/dotnet-cli-build/build.sh +++ b/build_projects/dotnet-cli-build/build.sh @@ -102,7 +102,7 @@ fi echo "Restoring Build Script projects..." ( cd "$DIR/.." - dotnet restore --infer-runtimes + dotnet restore ) # Build the builder diff --git a/build_projects/update-dependencies/project.json b/build_projects/update-dependencies/project.json index f82067b99..e6b372bee 100644 --- a/build_projects/update-dependencies/project.json +++ b/build_projects/update-dependencies/project.json @@ -24,5 +24,15 @@ "portable-net45+win" ] } + }, + "runtimes": { + "win7-x64": { }, + "win7-x86": { }, + "osx.10.10-x64": { }, + "osx.10.11-x64": { }, + "ubuntu.14.04-x64": { }, + "centos.7-x64": { }, + "rhel.7.2-x64": { }, + "debian.8-x64": { } } } diff --git a/build_projects/update-dependencies/update-dependencies.ps1 b/build_projects/update-dependencies/update-dependencies.ps1 index 50bd2013d..0f2eea827 100644 --- a/build_projects/update-dependencies/update-dependencies.ps1 +++ b/build_projects/update-dependencies/update-dependencies.ps1 @@ -17,41 +17,37 @@ if($Help) exit 0 } +$RepoRoot = "$PSScriptRoot\..\.." +$AppPath = "$PSScriptRoot" + # Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot if (!$env:DOTNET_INSTALL_DIR) { - $env:DOTNET_INSTALL_DIR="$PSScriptRoot\..\.dotnet_stage0\Windows\$Architecture" + $env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\Windows\$Architecture" } # Install a stage 0 Write-Host "Installing .NET Core CLI Stage 0" -& "$PSScriptRoot\obtain\dotnet-install.ps1" -Architecture x64 +& "$RepoRoot\scripts\obtain\dotnet-install.ps1" -Architecture x64 +if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" } # Put the stage0 on the path $env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH" -$appPath = "$PSScriptRoot\update-dependencies" - # Restore the build_projects -Write-Host "Restoring Microsoft.DotNet.Cli.Build.Framework..." -pushd $PSScriptRoot\..\build_projects\Microsoft.DotNet.Cli.Build.Framework -dotnet restore --infer-runtimes -if($LASTEXITCODE -ne 0) { throw "Failed to restore" } -popd - -# Restore update-dependencies -pushd $appPath -dotnet restore --infer-runtimes +Write-Host "Restoring Build projects..." +pushd "$RepoRoot\build_projects" +dotnet restore if($LASTEXITCODE -ne 0) { throw "Failed to restore" } popd # Publish the app -Write-Host "Compiling App $appPath..." -dotnet publish "$appPath" -o "$appPath\bin" --framework netcoreapp1.0 +Write-Host "Compiling App..." +dotnet publish "$AppPath" -o "$AppPath\bin" --framework netcoreapp1.0 if($LASTEXITCODE -ne 0) { throw "Failed to compile build scripts" } # Run the app -Write-Host "Invoking App $appPath..." +Write-Host "Invoking App $AppPath..." Write-Host " Configuration: $env:CONFIGURATION" -& "$appPath\bin\update-dependencies.exe" @Targets +& "$AppPath\bin\update-dependencies.exe" @Targets if($LASTEXITCODE -ne 0) { throw "Build failed" }