A way to find unused methods etc. in Visual studio

Dec 22 2011

While refactoring projects I’d like to get a list or graph of unused methods.  This is not only for tidying or big-rewrites but also for whenever one updates a method.  Every time this happens I’d like a ping that x less or y more methods are used.

Combine this with profiled unit tests and one could get the time&resource impact of a rewrite very fast.

First step is to create something that find dud methods/properties/classes/etc.

Second step is to make it awesomelly useful.

This idea is probably already created somewhere.  Anyone who knows?

2 responses so far

  1. Jonas Toftefors

    Have you checked out NDepend or Mighty Moose?

  2. @JonasToftefors:

    Unfortunately not. The nature of my work does not often give me the opportunity to delve into such tools.

    Mighty moose was new for me. It does a stab of getting rid of the document oriented IDE we are used to. http://ideas.selfelected.com/2011/06/source-code-editor-document-oriented/

    Ndepend has developed since I last looked at it.

    So much toys. So little time…

Leave a Reply