简体   繁体   English

跨多个解决方案和项目卸载/安装 Nuget Package

[英]uninstall / Install Nuget Package across multiple solutions and projects

  • How do I uninstall a package by id and version for all solutions and projects under a folder?如何按 id 和版本为文件夹下的所有解决方案和项目uninstall package by id and version
  • How do I install a package by id and version for all solutions and projects under a directory?如何按 id 和版本为目录下的所有解决方案和项目install package by id and version

There is a package manager approach with somewhat Similar Post that shows how to do that for all projects under A solution.有一个 package 管理器方法,带有类似的帖子,显示了如何为 A 解决方案下的所有项目执行此操作。 You can use Package Manager Console from solution and use this for one solution.您可以使用解决方案中的 Package Manager Console 并将其用于一个解决方案。 But how to do the same across multiple solutions and projects under them?但是如何在它们下的多个解决方案和项目中做同样的事情呢?

But how to do the same across multiple solutions and projects under them?但是如何在它们下的多个解决方案和项目中做同样的事情呢?

You cannot get what you want at present.你目前无法得到你想要的。

To uninstall packages, you should only use Manage Nuget packages for solution UI or Package Manager Console to uninstall one package for one solution.要卸载软件包,您应该只使用Manage Nuget packages for solution UIPackage Manager Console卸载一个 package 一个解决方案。 You can not use it to uninstall a package for several solutions at the same time.您不能使用它同时卸载多个解决方案的 package。 VS IDE does not support it. VS IDE 不支持。

Suggestion建议

So you should open a solution each time and run this command on Package Manager Console:因此,您应该每次打开一个解决方案并在 Package 管理器控制台上运行此命令:

Get-Project -All | Uninstall-Package xxx<package_name>

Or use Manage Nuget Packages for Solution或使用Manage Nuget Packages 解决方案

Besides , If you still want this feature, I suggest you could suggest a feature on ourUser Voice Forum .此外,如果您仍然想要此功能,我建议您可以在我们的用户语音论坛上推荐一个功能。

在此处输入图像描述

You can share the link with us here and anyone who is interested in it including us will vote it so that it will get more Microsoft's attention as soon as possible.您可以在此处与我们分享链接,包括我们在内的任何对此感兴趣的人都会对其进行投票,以便尽快引起微软的更多关注。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM