Find and remove redundant or unused code in Visual Studio 2008

I am working on a huge project VS 2008 (C #). We recently restructured a solution section to use domain-based architecture in an attempt to improve code and architecture.

Everything went well, but now in the old business layer there will now be a lot of redundant code that can remove the entire business layer, since it is still used elsewhere. Therefore, my question is: is there a (preferably free) tool that I can use to find a list of methods that are not found anywhere in the solution?

+4
source share
4 answers

See this article (from TrueWill) about finding unused methods in C #:

Alternatively, you can try FxCop or ReSharper .

+3
source

ReSharper will do it for you.

+3
source

TeamCity may report duplicate code.

EDIT: Sorry, I read your original question incorrectly. According to others, ReSharper with Solution Wide Analysis is a very good option, as is FxCop.

+1
source

NDepend is not free. But a very good tool. You can download a free trial .

He will do the job and you won’t have to pay for it.

It will not allow you to refactor, but you can use the Refactoring tools that come with Visual Studio.

+1
source

All Articles