What tools and techniques do you use to find dead

2019-01-09 00:46发布

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

In the past, I've decorated methods with the Obsolete attribute (passing true so the compiler will issue an error, as described in MSDN).

I'd be interested in seeing the suggestions of others (beyond tools like FxCop or ReSharper). I want to make sure I'm not missing out on other tools that would be helpful.

4条回答
爷、活的狠高调
2楼-- · 2019-01-09 01:21

Once again, I recommend AQTime. The static code analysis already does what you want (and a lot more), but the other profilers are even more useful. Worth the money, if you can afford it.

查看更多
叛逆
3楼-- · 2019-01-09 01:24

TDD + NCover

查看更多
▲ chillily
4楼-- · 2019-01-09 01:27

Why do you need other answers? FxCop and Resharper do the trick, especially seeing as FxCop is now integrated into VS through "Code Analysis".

查看更多
乱世女痞
5楼-- · 2019-01-09 01:28

it appears gray in ReSharper if it's dead code (at least within the solution only)...like uncalled methods or classes or unused properties and variables

查看更多
登录 后发表回答