R – Static analysis of .net assembly

analysisilreflectorstatic

I have a C# project for which I need to find the all private methods which are not called from any other public method directly or indirectly.

In addition, for each private method which is called from a public method, I need to know which public method it is. Then I will detemine if that method is really called from a client of the class and if not I will be able to remove it.

In the past I used a code from Lutz Rorder which is the base of Reflector – it had an option to analyze IL code and gave object model on top of it. I cannot find this code now.

Any suggestion?
Maybe a point to that Lutz Rorder code?

Saar

Best Answer

You should check out Nitriq Static Code Analysis for .Net - They have a free community edition and their full blown license is pretty reasonable.