detect (into the whole solution) unused public method and propertie

Hi,

Is there any way to detect "dead code" in the whole solution?

I have a lot of public unused methods everywhere and I am not able to detect them. I am currently using the free version of NDEPEND to do it. But I prefeir your tool.

Is it possible?

Best regards.

MS

7 comments

ReSharper will show you that certain things are dead code.  It will change their color to grey in your code and give you an option to remove the unused code or comment it out.

0

Yes it will, but the file must be opened.

I have about 3000 files .cs and I can't open each file to find dead code.

My problem is that after modifying some classes, I forgot to delete some public methods. Those are not used anymore.

Using NDepend, I found 358 unused public methods all over the classes, that are mine and not generated.

I cannot use the free version of NDepend to open the code (the professional upgrade would, but it's too expansive just to find dead code). So I would like to use resharper to do the same.

Opening each file would take too much time.

0

Hello M,

Opening each file would take too much time.


Try to use ReSharper plugin ".NET Code Inspector" - http://safedevelop.com/Products/CodeInspector/default.aspx

Best regards,
Alexander Nesterenko
Safe Develop Team


0

M S schrieb:

Is there any way to detect "dead code" in the whole solution?

I have a lot of public unused methods everywhere and I am not able to detect them. I am currently using the free version of NDEPEND to do it. But I prefeir your tool.

Is it possible?


R# 4.5 will have this functionality.

Regards

Albert

0

ReSharper 4.5 adds functionality of detecting unused public symbols (as well
as many other things like public symbol can be made private) and highlighting
them in the text editor. You have to turn on "Solution-Wide Analysis" feature
to get this functionality (double-click gray circle in the right bottom corner
of the main window). You are right that this feature currently works only
for the current file. We plan to add ability to run it explicitly on the
given scope (whole solution, particular project etc) in ReSharper 5.0.

Valentin Kipiatkov
CTO and Chief Scientist
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hi,

Is there any way to detect "dead code" in the whole solution?

I have a lot of public unused methods everywhere and I am not able to
detect them. I am currently using the free version of NDEPEND to do
it. But I prefeir your tool.

Is it possible?

Best regards.

MS

---
Original message URL:
http://www.jetbrains.net/devnet/message/5230247#5230247



0

I second this as a feature request!  If RS could have some solution-wide reporting facility to show these types of things that would be amazing. Perfect for taking over maintenance of a project or mass cleaning up!

0

I'm looking forward seeing this new stuff!!!

Best regards

MS

0

Please sign in to leave a comment.