Skip to content

Commit f0cc88d

Browse files
authored
Populate RepackDropAttributes from specified RepackDropAttribute. (#56)
1 parent afbc5f8 commit f0cc88d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ILRepack.Lib.MSBuild.Task/ILRepack.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public virtual string OutputFile
213213
/// <summary>
214214
/// Name of an attribute (optional). Members in input assemblies marked with this attribute will be dropped during merging.
215215
/// </summary>
216-
public string RepackDropAttribute { get; set; }
216+
public virtual string RepackDropAttribute { get; set; }
217217

218218
#endregion
219219

@@ -331,6 +331,11 @@ public override bool Execute()
331331
repackOptions.InternalizeAssemblies = InternalizeAssembly.Select(i => StripExtension(i.ItemSpec)).ToArray();
332332
}
333333

334+
if (!string.IsNullOrWhiteSpace(repackOptions.RepackDropAttribute))
335+
{
336+
repackOptions.RepackDropAttributes.UnionWith(RepackDropAttribute.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries));
337+
}
338+
334339
// Path that will be used when searching for assemblies to merge.
335340
var searchPath = new List<string> { "." };
336341
searchPath.AddRange(LibraryPath.Select(iti => BuildPath(iti.ItemSpec)));

0 commit comments

Comments
 (0)