5

is there any way to update all packages except one? For instance when I created new project I need to update all packages except jQuery. It should stay at same version.

Kadir
  • 3,094
  • 4
  • 37
  • 57

2 Answers2

12

You could write a custom script for updating the packages like the following and execute it in the 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 } }
KnightFox
  • 3,132
  • 4
  • 20
  • 35
  • 1
    You should first run an update-package -whatif and read through the output to make sure that none of the new updates want a later version of jQuery. If they do not require a later version, the solution here is most ideal. If a newer version is required by one of the updates, you will have to update the package that requires the later version with the -IgnoreDependencies flag and cross your fingers – badazzhindu Jul 10 '15 at 13:52
-2

no there is no direct way of doing that. May be you can update all, then uninstall JQuery and install the version of jquery you want.

Prashant
  • 460
  • 3
  • 12