Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What tools and techniques do you use to find dead code? [closed]

What tools and techniques do you use to find dead code in .NET?

In the past, I've decorated methods with the Obsolete attribute (passing true so the compiler will issue an error, as described in MSDN).

I'd be interested in seeing the suggestions of others (beyond tools like FxCop or ReSharper). I want to make sure I'm not missing out on other tools that would be helpful.


2 Answers

Why do you need other answers? FxCop and Resharper do the trick, especially seeing as FxCop is now integrated into VS through "Code Analysis".

like image 113
Quibblesome Avatar answered Sep 13 '25 20:09

Quibblesome


it appears gray in ReSharper if it's dead code (at least within the solution only)...like uncalled methods or classes or unused properties and variables

like image 24
cruizer Avatar answered Sep 13 '25 19:09

cruizer