Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio find nuget packages that aren't being used

Sometimes I load Nuget packages into my solution that I don't end up actually using, or I use them for awhile, then switch to something else, and forget to remove the old package. I suspect that my solution has Nuget packages installed that I'm not actually using anymore.

Is there a way to find unused installed Nuget packages, other than removing them one by one and checking for build errors?

like image 984
JoeMjr2 Avatar asked Oct 30 '22 12:10

JoeMjr2


1 Answers

You can use the ReSharper to help you remove those unused NuGet packages.

ReSharper 10.1 EAP significally improves performance on updating NuGet packages and analyzing project references. It also fixes a set of issues that used to break compilation by erroneously removing references that were in fact in use (which, for instance, used to happen when using the dynamic type).

Note that:ReSharper does not support for project.json projects (RSRP-454515) and ASP.NET core projects (RSRP-459076)

like image 192
Leo Liu-MSFT Avatar answered Jan 02 '23 21:01

Leo Liu-MSFT