Skip to content

Commit

Permalink
[msbuild] Add a check for actually having anything to AOTCompile. (#2…
Browse files Browse the repository at this point in the history
…0206)

This particular condition shouldn't happen, but occasional build errors in the
wild (with exception stack traces) seem to indicate otherwise, so be a bit
defensive here.
  • Loading branch information
rolfbjarne committed Mar 1, 2024
1 parent 45be329 commit 943ebaf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions msbuild/Xamarin.MacDev.Tasks/Tasks/AOTCompile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@ bool IsUpToDate (FileInfo input, FileInfo output)

public override bool Execute ()
{
if (Assemblies.Length == 0) {
// Not sure how this can happen, since Assemblies is [Required], but it seems to happen once in a while.
Log.LogMessage (MessageImportance.Low, "Nothing to AOT-compile");
return true;
}

if (ShouldExecuteRemotely ())
return new TaskRunner (SessionId, BuildEngine4).RunAsync (this).Result;

Expand Down

7 comments on commit 943ebaf

@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.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.