Update all packages except one

Is there a way to update all packages except one? For example, when I created a new project, I need to update all packages except jQuery. It should remain in the same version.

+3


source to share


2 answers


You can write custom script to update packages like below and execute it in Package Manager Console



  $list = Get-package -project {Add project name here}
  for($i=0; $i -lt $list.Length;$i ++ ) { if($list[$i].Id -ne "jquery") { Update-Package -project {Add project name here} $list[$i].Id } }

      

+9


source


no, there is no direct way to do this. Maybe you can update everything, then uninstall the jQuery and install the jquery version you want.



-2


source







All Articles