Created
March 28, 2015 17:09
-
-
Save patrickperrone/ac4922db06ec2b393de3 to your computer and use it in GitHub Desktop.
Enforce "Copy Local = false" for DLL references added by NuGet. This script should be added under the Tools folder.
This file contains hidden or 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
param($installPath, $toolsPath, $package, $project) | |
$asms = $package.AssemblyReferences | %{$_.Name} | |
foreach ($reference in $project.Object.References) | |
{ | |
if ($asms -contains $reference.Name + ".dll") | |
{ | |
$reference.CopyLocal = $false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment