Occasionally I am looking at some code, I search for usages of a method (using resharper) and find that it is only called by tests. So it's effectively redundant and I can delete it and the methods that call it.
Obviously there's no point in having unused code lying around the place, slowing down the build and the test run. What I'd like is a tool that can tell me where all the bits of production code are that are only accessed by tests.
I have a full version of resharper, and also a trial version of NDepend, but haven't found out how to use either of these to get the result I want (without paying for it). I suspect It may be possible with the full version of NDepend but are there any other tools that people know about?
If the context helps, the solution is and ASP.net website, much of whose functionality is handled by a WCF service. So the only valid entry points to the bulk of the code are the service methods. The tests are in their own seperate projects.
I've started a bounty because I'm sure someone else must have had and solved this problem before!