Created
August 6, 2014 13:32
-
-
Save seankearney/badd0b281baaa60c25c4 to your computer and use it in GitHub Desktop.
NuGet install.ps1 to set CopyLocal to false
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
param($installPath, $toolsPath, $package, $project) | |
write-host =================================================== | |
write-host "Setting 'CopyLocal' to false for the following references:" | |
$asms = $package.AssemblyReferences | %{$_.Name} | |
foreach ($reference in $project.Object.References) | |
{ | |
if ($asms -contains $reference.Name + ".dll") | |
{ | |
Write-Host $reference.Name | |
$reference.CopyLocal = $false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment