diff --git a/build.cake b/build.cake index 354e768f5ee..a3a0392b654 100644 --- a/build.cake +++ b/build.cake @@ -450,7 +450,17 @@ Task ("samples") // build solutions locally var solutions = GetFiles ("./output/samples/**/*.sln"); + + Information ("Solutions found:"); + foreach (var sln in solutions) { + Information (" " + sln); + } + foreach (var sln in solutions) { + // might have been deleted due to a platform build and cleanup + if (!FileExists (sln)) + continue; + var name = sln.GetFilenameWithoutExtension (); var slnPlatform = name.GetExtension (); @@ -460,6 +470,8 @@ Task ("samples") if (!variants.Any ()) { // there is no platform variant BuildSample (sln); + // delete the built sample + CleanDirectories (sln.GetDirectory ().FullPath); } else { // skip as there is a platform variant } @@ -472,6 +484,8 @@ Task ("samples") (isWin && slnPlatform == ".windows"); if (shouldBuild) { BuildSample (sln); + // delete the built sample + CleanDirectories (sln.GetDirectory ().FullPath); } else { // skip this as this is not the correct platform }