Skip to content

Instantly share code, notes, and snippets.

@seankearney
Created August 6, 2014 13:32
Show Gist options
  • Save seankearney/badd0b281baaa60c25c4 to your computer and use it in GitHub Desktop.
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