views:

76

answers:

3

I believe lots of us have been presented with a challenge to check manually through hundreds of string constants to check which ones are used and which are not (orphans). Although I do not have that many yet in my current project, I still find it difficult already to do a code review and check for dropped constants manually.

Is there any way to automate this? Maybe some secret hidden feature in VS?

I have an ASP.NET MVC project with VS 2008. So I'd like to check for all possible references to resources in both .cs and .aspx files.

My guess is that would not be possible. Still, maybe there is something to help me with this task?

+2  A: 

CodeRush from Developer Express provides all sorts of orphan checks. They just released a free version - CodeRush Express - although I'm not entirely sure what features are in the free version. Would seem plausible that a feature like this would have been left in, though.

It's a pretty powerful tool, so I'd recommend it anyway.

dommer
+1  A: 

NDepend supports searching for unused public methods / properties etc. Also, Resharper 4.5 now highlights all unused non-private members if you turn on solution wide analysis.

Steve Willcock
+1  A: 

Also Resharper is the best tool for VS IDE,it does all that for you plus many other options.

hope this helps.