Skip to content

Commit

Permalink
Update ResourceEmbedder.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Oct 22, 2021
1 parent 5df40c1 commit e304dbf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Costura.Fody/ResourceEmbedder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -459,13 +459,13 @@ private EmbeddedReferenceInfo InnerEmbed(string prefix, string relativePath, str
if (compress)
{
resourceName += ".compressed";
}

if (ModuleDefinition.Resources.Any(x => string.Equals(x.Name, resourceName, StringComparison.OrdinalIgnoreCase)))
{
// an assembly that appeared twice in the ReferenceCopyLocalPaths, e.g. the same library from different nuget packages (https://github.com/Fody/Costura/issues/332)
WriteDebug($"\t\tSkipping '{fullPath}' because it is already embedded");
return null;
}
if (ModuleDefinition.Resources.Any(x => string.Equals(x.Name, resourceName, StringComparison.OrdinalIgnoreCase)))
{
// an assembly that appeared twice in the ReferenceCopyLocalPaths, e.g. the same library from different nuget packages (https://github.com/Fody/Costura/issues/332)
WriteDebug($"\t\tSkipping '{fullPath}' because it is already embedded");
return null;
}

WriteInfo($"\t\tEmbedding '{fullPath}'");
Expand Down

0 comments on commit e304dbf

Please sign in to comment.