Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/8.0.1xx-preview6] [msbuild] Fix ILStripping of resource assemblies on Windows. #18526

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion msbuild/Xamarin.iOS.Tasks/Tasks/ILStripBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,20 @@ public override bool Execute ()
return result;
}

public bool ShouldCopyToBuildServer (ITaskItem item) => false;
public bool ShouldCopyToBuildServer (ITaskItem item)
{
// Some assemblies are already on the Mac, and we have a 0-length
// output file on Windows. We don't want to copy these files.
// However, some assemblies have to be copied, because they don't
// already exist on the Mac (typically resource assemblies). So
// filter to assemblies with a non-zero length.

var finfo = new FileInfo (item.ItemSpec);
if (!finfo.Exists || finfo.Length == 0)
return false;

return true;
}

public bool ShouldCreateOutputFile (ITaskItem item) => true;

Expand Down