Update all packages except one

烈酒焚心 提交于 2019-12-14 03:48:44

问题


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.


回答1:


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



回答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.



来源:https://stackoverflow.com/questions/31249356/update-all-packages-except-one

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!