Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NuGet Uninstall.ps1 - remove a project reference

So in my Install.ps1 I can add a reference like this:

param($installPath, $toolsPath, $package, $project)
$project.Object.References.Add("YourDLL")

How do you remove a project reference in PowerShell?

like image 901
rick schott Avatar asked Feb 03 '11 05:02

rick schott


1 Answers

Here's what we use for Machine.Specifications:

param($installPath, $toolsPath, $package, $project)
$project.Object.References | Where-Object { $_.Name -eq 'Machine.Specifications.TDNetRunner' } | ForEach-Object { $_.Remove() }
like image 120
Alexander Groß Avatar answered Oct 13 '22 12:10

Alexander Groß