How do I override CopyLocal (Private) setting for references in .NET from MSBUILD

Try this:

Set the CustomAfterMicrosoftCommonTargets to C:\foo\filter.targets (or whatever you name the file) and have filter.targets to be:

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <ItemDefinitionGroup>
      <Reference>
        <Private>False</Private>
      </Reference>
    </ItemDefinitionGroup>
</Project>

Leave a Comment