Resharper- Find all unused classes

Rocky Singh picture Rocky Singh · Jan 10, 2011 · Viewed 40.1k times · Source

I know how to find unused references of a single file by right clicking on the file and selecting the "Find Usages" option. Is there any way I can see or get the list of all the unused classes or files in my project ?

Answer

ulrichb picture ulrichb · Jan 10, 2011

First enable "Analyze Errors In Solution" (right-click on the Resharper icon in the status bar).

Then right-click the solution node and select "Find Code issues". In the "Inspection results" tool window you can group by "Issue type" and look for "Type or type member is never used" to get all unused classes (and many more unused symbols).

A second option (after enabling "Analyze Errors In Solution") is to go to any unused class, hit Alt+Enter, select "Options for 'Type or type member ...' inspection" | Find all code issues of this type | Entire solution.

Inspection results window sample