Skip to content

Commit

Permalink
[msbuild] Don't create output files on Windows for unpacked resources…
Browse files Browse the repository at this point in the history
… from the UnpackLibraryResource task.

We already handle incremental builds using stamp files in the .targets file,
so creating output files on Windows is not necessary.

It also causes problems later on in the build, because we may end up copying
those (empty) output files back to the Mac.
  • Loading branch information
rolfbjarne committed Oct 28, 2024
1 parent 64c425d commit 007f339
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion msbuild/Xamarin.MacDev.Tasks/Tasks/UnpackLibraryResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,12 @@ public bool ShouldCopyToBuildServer (ITaskItem item)
return true;
}

public bool ShouldCreateOutputFile (ITaskItem item) => UnpackedResources.Contains (item) == true;
public bool ShouldCreateOutputFile (ITaskItem item)
{
// Incremental builds are handled with stamp files in the .targets file, so there's no need to
// create any output files on Windows.
return false;
}

public IEnumerable<ITaskItem> GetAdditionalItemsToBeCopied () => ItemsFiles;

Expand Down

0 comments on commit 007f339

Please sign in to comment.