Skip to content

Instantly share code, notes, and snippets.

@seankearney
Created August 6, 2014 13:32
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save seankearney/badd0b281baaa60c25c4 to your computer and use it in GitHub Desktop.
NuGet install.ps1 to set CopyLocal to false
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