Find dead code in asp.net project
Answered
Is there a tool to find dead code in an asp.net 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.
Please sign in to leave a comment.
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.
Thanks!
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.