-
Notifications
You must be signed in to change notification settings - Fork 217
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
Feature request: conditionally merge duplicated members #215
Comments
No this feature isn't available, not sure it makes sense for the tool, though there's already options for flagging types as intern, what's your use case for removing these members ? |
I am attempting to merge two assemblies compiled from different projects. |
I think it is easier for you to write custom merge tool with Mono.Cecil |
You mean you are using allowdup/union to merge these types with same name into one ? |
(actually ILRepack ignores duplicated members, so if your "true" members are in the same assembly, providing it first in the command line should work) |
@gluck Thanks for replying. |
When I was trying to use this approach, I met with a problem about the My primary assembly named A needed to be merged with another assembly named B. If I specify B first, followed by A, then A and B got merged together, however, the AssemblyVersion was the one in B, no longer the on in the primary assembly, A, even if I have specified |
Well, I solved the above problem by specifying |
lots of topics there ! Here's my take:
|
The problem of Maybe it is possible to take advantage of the |
I'd rather support an attribute by name only (like mono-linker Or we could support another by-name-attributes, like |
OK. I am looking forward to it. |
How are you doing @gluck ? Any progress on this? |
Hello, sorry if I let you think otherwise, but I have no plan to implement this myself. Let me know. |
I found the "RepackDrop" annotation support was quite easy to implement. I took several minutes and I got it up and running. |
Simply add a method and use it in the private bool CanInclude<TMember> (TMember member)
where TMember : ICustomAttributeProvider, IMemberDefinition {
// skip members marked with a custom attribute named "RepackDrop"
var marked = member.HasCustomAttributes
&& member.CustomAttributes.FirstOrDefault(attr => attr.AttributeType.Name == "RepackDropAttribute") != null;
if (marked) {
_logger.Log("Repack dropped " + member.FullName);
}
return marked == false;
} |
Usage:
|
The PR added option support for the RepackDrop attribute name (by default, |
Implemented via #221 |
Is it possible to remove some members during the repack?
For instance, I'd like to remove some members marked with a specific attribute, or given full names.
The text was updated successfully, but these errors were encountered: