Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Add "restore_tools" that gets a new NuGet version for a workaround #224

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion build_projects/dotnet-host-build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions restore_projects/NuGet.CommandLine.XPlat.Runner/Program.cs
Original file line number Diff line number Diff line change
@@ -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);
}
25 changes: 25 additions & 0 deletions restore_projects/NuGet.CommandLine.XPlat.Runner/project.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
}
}