Find dead code in project


Is there a tool to find dead code in an 7 project?

E.g. a profiler I could run in my dev environment and the I would call all url's I see have been called in production for the last three months.


Hello Mathias Ronnlund,

dotCover is the best choice for such a usecase. It will show all the statements executed in runtime, so you can easily define useless code. 

You may run coverage analysis of ASP.NET project from 

Should you have additional questions, please let me know.




So in addition to show all statements executed, what is the experience around finding code not executed?


dotCover will build the coverage tree according to the build artefacts. 

In the coverage tree, you will see covered and uncovered code entities. 

Looking at uncovered entities you may inspect them and define them as “dead” or “alive” code.




Please sign in to leave a comment.