Skip to content

Commit

Permalink
[release/7.0.2xx-xcode14.3] [msbuild] Copy the zip file back to Windo…
Browse files Browse the repository at this point in the history
…ws from the Zip task for remote builds. Fixes #18402. (#18454)

The zip file might be used later directly on Windows (for instance it
might be embedded inside a binding assembly as an embedded resource), so make
sure to copy it back to Windows.

Fixes #18402 part 2.

Backport of #18447

Co-authored-by: Rolf Bjarne Kvinge <[email protected]>
  • Loading branch information
1 parent cbfef67 commit 8606b32
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions msbuild/Xamarin.MacDev.Tasks/Tasks/Zip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,16 @@ namespace Xamarin.MacDev.Tasks {
public class Zip : ZipTaskBase, ITaskCallback {
public override bool Execute ()
{
if (ShouldExecuteRemotely ())
return new TaskRunner (SessionId, BuildEngine4).RunAsync (this).Result;
if (ShouldExecuteRemotely ()) {
var taskRunner = new TaskRunner (SessionId, BuildEngine4);
var rv = taskRunner.RunAsync (this).Result;

// Copy the zipped file back to Windows.
if (rv)
taskRunner.GetFileAsync (this, OutputFile.ItemSpec).Wait ();

return rv;
}

return base.Execute ();
}
Expand Down

6 comments on commit 8606b32

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.