更新除一个之外的所有软件包 [英] Update all packages except one

查看:62
本文介绍了更新除一个之外的所有软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法更新除一个之外的所有软件包?例如,当我创建新项目时,我需要更新除 jQuery 之外的所有包.它应该保持相同的版本.

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.

推荐答案

您可以编写一个自定义脚本来更新包,如下所示并在包管理器控制台中执行

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

这篇关于更新除一个之外的所有软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆