Skip to content

Commit

Permalink
Merge pull request #64 from wwwDayDream/fix_critical-msbuild-error
Browse files Browse the repository at this point in the history
Secondary Fix
  • Loading branch information
wwwDayDream authored May 18, 2024
2 parents 821f352 + bf2ecbe commit 5de1458
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CessilCellsCeaChells.MSBuild/MergeTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class MergeTask : Task {
private const string FileNameMetadata = "FileName";
private const string NuGetPackageIdMetadata = "NuGetPackageId";
private const string FullPathMetadata = "HintPath";
private const string FullPathMetadataAlt = "FullPath";

public override bool Execute()
{
Expand Down Expand Up @@ -168,5 +169,10 @@ private static string ByteArrayToString(IReadOnlyCollection<byte> data)

return builder.ToString();
}
private static string FilePathFromTask(ITaskItem taskItem) => taskItem.GetMetadata(FullPathMetadata);
private static string FilePathFromTask(ITaskItem taskItem)
{
var fullPath = taskItem.GetMetadata(FullPathMetadata);
fullPath = string.IsNullOrEmpty(fullPath) ? taskItem.GetMetadata(FullPathMetadataAlt) : fullPath;
return fullPath;
}
}

0 comments on commit 5de1458

Please sign in to comment.