From 3e4aa12a54baf0a0b7baf9e306e8b99dc1bd79ba Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Thu, 17 Nov 2022 16:31:11 +0000 Subject: [PATCH] Do not copy files to build server for a Delete. (#16752) The `Delete` task should not need to copy any files to the remote server. Lets try to set this up by implementing the `ShouldCopyToBuildServer` method. This should help reduce build times if it works. --- msbuild/Xamarin.MacDev.Tasks/MsBuildTasks/Delete.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/msbuild/Xamarin.MacDev.Tasks/MsBuildTasks/Delete.cs b/msbuild/Xamarin.MacDev.Tasks/MsBuildTasks/Delete.cs index fdd65a213a..2885067f25 100644 --- a/msbuild/Xamarin.MacDev.Tasks/MsBuildTasks/Delete.cs +++ b/msbuild/Xamarin.MacDev.Tasks/MsBuildTasks/Delete.cs @@ -1,7 +1,10 @@ +using System.Collections.Generic; +using System.Linq; +using Microsoft.Build.Framework; using Xamarin.Messaging.Build.Client; namespace Microsoft.Build.Tasks { - public class Delete : DeleteBase { + public class Delete : DeleteBase, ITaskCallback { public override bool Execute () { var result = base.Execute (); @@ -25,5 +28,11 @@ namespace Microsoft.Build.Tasks { return result; } + + public bool ShouldCopyToBuildServer (ITaskItem item) => false; + + public bool ShouldCreateOutputFile (ITaskItem item) => false; + + public IEnumerable GetAdditionalItemsToBeCopied () => Enumerable.Empty (); } }