1

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

Does anyone know of a tool that can find functions that are not being called?

Clarification: functions that are not being called by anything in the solution. Should not matter if they are public, private etc.

Community
  • 1
  • 1
bleevo
  • 1,607
  • 2
  • 18
  • 30
  • This question needs clarification: "not being called"... do you mean private methods in a class not being called by any other methods in the class? Or do you mean which public methods in your whole solution are not being used elsewhere in your application? – mlibby Dec 01 '10 at 03:38

6 Answers6

4

There are several tools available which will do this to varying degrees of depth.

  • Resharper
  • NCover
  • FxCop
JaredPar
  • 703,665
  • 143
  • 1,211
  • 1,438
1

ReSharper will identify private or internal methods that are not called.

Mark Rushakoff
  • 238,196
  • 44
  • 399
  • 395
1

NCover will give you all kinds of code coverage goodness, however I believe it's a bit expensive.

Ronnie Howell
  • 627
  • 3
  • 8
0

Microsoft's FxCop can do that for you.

Zach Johnson
  • 22,702
  • 6
  • 67
  • 85
  • Only for private members, although here is a good discussion about how it can help http://stackoverflow.com/questions/71518/is-there-a-custom-fxcop-rule-that-will-detect-unused-public-methods – mlibby Dec 01 '10 at 03:34
0

try ncover, its good tool which helps in refactoring a lot

TalentTuner
  • 17,031
  • 5
  • 37
  • 62
0

i myself hate Resharper because their many thing goes wrong in Resharper. you need to use telerik customization it can be better then resharper.