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.
This commit is contained in:
Eric Erhardt 2016-05-17 10:36:02 -05:00
parent aea6fc62ac
commit 7cb7b660d8

View file

@ -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");