NuGet Uninstall.ps1 - remove a project reference

前端 未结 2 613
栀梦
栀梦 2021-02-09 14:44

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

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


        
2条回答
  •  忘了有多久
    2021-02-09 15:19

    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() }
    

提交回复
热议问题