diff --git a/build.cake b/build.cake index 7b325908..6edd7fa1 100644 --- a/build.cake +++ b/build.cake @@ -180,14 +180,17 @@ Task ("samples") .IsDependentOn("libs") .Does(() => { + var msBuildSettings = new DotNetCoreMSBuildSettings (); + var dotNetCoreBuildSettings = new DotNetCoreBuildSettings { + Configuration = "Release", + Verbosity = DotNetCoreVerbosity.Diagnostic, + MSBuildSettings = msBuildSettings + }; + foreach (var target in SAMPLES_TARGETS) - MSBuild(SOLUTION_PATH, c => { - c.Configuration = "Release"; - c.Restore = true; - c.MaxCpuCount = 0; - c.Targets.Clear(); - c.Targets.Add($@"samples-using-source{BACKSLASH}{target}"); - }); + msBuildSettings.Targets.Add($@"samples-using-source\{target}"); + + DotNetCoreBuild(SOLUTION_PATH, dotNetCoreBuildSettings); }); Task ("nuget")