ReferenceTrimmer
ReferenceTrimmer copied to clipboard
Defer evaluation of EnableReferenceTrimmer
Fixes #96
Evaluation of the condition just before the task execution allows to have the property modified in a custom task (also plugged in through a new depends-on property).
CollectDeclaredReferencesDependsOn would not be able to disable the Target. The condition for the target is evaluated before its DependsOnTargets are executed.
I'm not opposed to this change since it makes the specific location that EnableReferenceTrimmer is set more flexible, but I don't think this will solve your problem.