From 7cb7b660d802c36b0607959c21bbf3138367996b Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Tue, 17 May 2016 10:36:02 -0500 Subject: [PATCH] Move RestorePackages to Prepare, not Init. RestorePackages will fail if the 'artifacts\rid\corehost` folder doesn't exist. So other targets that depend on Init can't run unless the host has been built. --- build_projects/dotnet-cli-build/PrepareTargets.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build_projects/dotnet-cli-build/PrepareTargets.cs b/build_projects/dotnet-cli-build/PrepareTargets.cs index de3805f7a..91c65a0f2 100644 --- a/build_projects/dotnet-cli-build/PrepareTargets.cs +++ b/build_projects/dotnet-cli-build/PrepareTargets.cs @@ -17,7 +17,7 @@ namespace Microsoft.DotNet.Cli.Build { public class PrepareTargets { - [Target(nameof(Init))] + [Target(nameof(Init), nameof(RestorePackages))] public static BuildTargetResult Prepare(BuildTargetContext c) => c.Success(); [Target(nameof(CheckPrereqCmakePresent), nameof(CheckPlatformDependencies))] @@ -38,8 +38,7 @@ namespace Microsoft.DotNet.Cli.Build nameof(UpdateTemplateVersions), nameof(CheckPrereqs), nameof(LocateStage0), - nameof(ExpectedBuildArtifacts), - nameof(RestorePackages))] + nameof(ExpectedBuildArtifacts))] public static BuildTargetResult Init(BuildTargetContext c) { var configEnv = Environment.GetEnvironmentVariable("CONFIGURATION");