From ca1f4fcf5ea6940a4b9d99fa8f2a619a65734d37 Mon Sep 17 00:00:00 2001 From: Davis Goodin Date: Fri, 22 Jul 2016 15:22:04 -0500 Subject: [PATCH] Add "restore_tools" that pulls down a new NuGet version for a workaround. --- build_projects/dotnet-host-build/build.sh | 10 +++++++- .../NuGet.CommandLine.XPlat.Runner/Program.cs | 10 ++++++++ .../project.json | 25 +++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 restore_projects/NuGet.CommandLine.XPlat.Runner/Program.cs create mode 100644 restore_projects/NuGet.CommandLine.XPlat.Runner/project.json diff --git a/build_projects/dotnet-host-build/build.sh b/build_projects/dotnet-host-build/build.sh index 919e694dbc..ce1cd3c385 100755 --- a/build_projects/dotnet-host-build/build.sh +++ b/build_projects/dotnet-host-build/build.sh @@ -110,11 +110,19 @@ fi # Disable first run since we want to control all package sources export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 +# Restore the restore tool +echo "Restoring Restore projects..." +( + cd "$REPOROOT/restore_projects" + dotnet restore +) +NUGET_RUNNER="$REPOROOT/restore_projects/NuGet.CommandLine.XPlat.Runner" + # Restore the build scripts echo "Restoring Build Script projects..." ( cd "$DIR/.." - dotnet restore --infer-runtimes + dotnet run -p "$NUGET_RUNNER" restore --infer-runtimes --disable-parallel ) # Build the builder diff --git a/restore_projects/NuGet.CommandLine.XPlat.Runner/Program.cs b/restore_projects/NuGet.CommandLine.XPlat.Runner/Program.cs new file mode 100644 index 0000000000..f61d409b11 --- /dev/null +++ b/restore_projects/NuGet.CommandLine.XPlat.Runner/Program.cs @@ -0,0 +1,10 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using NugetProgram = NuGet.CommandLine.XPlat.Program; + +public class Program +{ + public static void Main(string[] args) => NugetProgram.Main(args); +} diff --git a/restore_projects/NuGet.CommandLine.XPlat.Runner/project.json b/restore_projects/NuGet.CommandLine.XPlat.Runner/project.json new file mode 100644 index 0000000000..c3cd90fbe0 --- /dev/null +++ b/restore_projects/NuGet.CommandLine.XPlat.Runner/project.json @@ -0,0 +1,25 @@ +{ + "version": "1.0.0-*", + "description": "Redirects args to NuGet.CommandLine.XPlat. Allows usage of a newer version of NuGet than the CLI stage 0 has.", + "buildOptions": { + "debugType": "portable", + "emitEntryPoint": true + }, + "dependencies": { + "NuGet.CommandLine.XPlat": "3.5.0-rc1-1639" + }, + "frameworks": { + "netcoreapp1.0": { + "dependencies": { + "Microsoft.NETCore.App": { + "type": "platform", + "version": "1.0.0" + } + }, + "imports": [ + "dnxcore50", + "portable-net45+win8" + ] + } + } +} \ No newline at end of file