diff --git a/nuke/Build.cs b/nuke/Build.cs index 3ea3cf5..83dfa45 100644 --- a/nuke/Build.cs +++ b/nuke/Build.cs @@ -69,6 +69,16 @@ protected override void OnBuildInitialized() SourceDirectory.GlobDirectories("**/bin", "**/obj").ForEach(x => x.DeleteDirectory()); ArtifactsDirectory.CreateOrCleanDirectory(); }); + + Target Restore => _ => _ + .Description("Restore Solution") + .DependsOn(Initial) + .Executes(() => + { + DotNetRestore(s => s + .SetProjectFile(Solution) + ); + }); // Target Compile => _ => _ // .Description("Compile Projects") @@ -85,7 +95,7 @@ protected override void OnBuildInitialized() Target Pack => _ => _ .Description("Pack Projects") - .DependsOn(Clean) + .DependsOn(Restore) .Executes(() => { DotNetPack(p => p @@ -93,7 +103,6 @@ protected override void OnBuildInitialized() .SetConfiguration(Configuration) .SetVersion(Version) .SetNoBuild(true) - .SetNoRestore(true) .EnableContinuousIntegrationBuild() ); });