Created
February 28, 2018 04:40
-
-
Save markryd/5007052549ff3ea0c4f40c7ca7a7b6fa to your computer and use it in GitHub Desktop.
Build task to fail on duplicate package references
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Target Name="PreBuild" BeforeTargets="PreBuildEvent"> | |
<Error Text="A package is referenced more than once, check the csproj and remove the duplicate reference." Condition="@(PackageReference->Count()) != @(PackageReference->Distinct()->Count())" /> | |
</Target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment