Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I uninstall *a* package from all projects in solution

Not a duplicate of:

The other question does not talk about removing one single package from all the projects inside solution.


What is the command to uninstall a specific package from all projects inside a solution?

Visual studio GUI still seems to be naive to support these features.

like image 692
Abhijeet Avatar asked Dec 07 '22 13:12

Abhijeet


1 Answers

What is the command to uninstall a specific package from all projects inside a solution?

You can use following command line in the Package Manager Console:

Get-Project -All | Uninstall-Package <package name> 

If this package have dependencies, you can add option -RemoveDependencies in above command line.

Visual studio GUI still seems to be naive to support these features.

Right-click your solution > Manage NuGet Packages for Solution..., switch to the Install tab, select the package which you want to uninstall, then you can check the first checkbox, all the check boxes would be selected, click the uninstall button:

enter image description here

This package will uninstall from all projects in the solution.

Hope this helps.

like image 191
Leo Liu-MSFT Avatar answered Dec 10 '22 01:12

Leo Liu-MSFT