Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tool for Visual Studio to automatically remove methods that aren't being referenced

I'm looking for a feature, script, or tool in Visual Studio to remove methods that aren't referenced by any code in a solution.

All my projects are in one solution (i.e. no external class libraries).

Usually I right-click on methods and choose "Find All References," and if the method declaration is the only reference, I delete he method, to help clean up the code.

For me this helps in the code analysis/reverse engineering process.

like image 262
JohnB Avatar asked Dec 08 '25 23:12

JohnB


1 Answers

Try ReSharper: http://www.jetbrains.com/resharper/features/code_refactoring.html?gclid=CN66956kqagCFQoZ4Qodexn_HA

It's not free, but it is awesome :)

like image 109
Jackson Pope Avatar answered Dec 11 '25 12:12

Jackson Pope