I know you can perform a 'Find All References' on a function and you can determine if it is being used anywhere, but is there a tool that will go through all of my functions and highlight any that are not called anywhere in the code?
+7
A:
I believe ReSharper can do what you want. More specifically, the Safe Delete command should at least faciliate the job. Although I haven't tried it, the Code Cleanup tool may well do the whole thing automatically.
Noldorin
2009-10-07 13:19:26
It does, although i believe it's for Visual Studio only.Highly recommend it by the way
Hal
2009-10-07 13:22:54
Indeed, Visual Studio only. The OP has tagged their question with VS2008 however, so I think that's no matter.
Noldorin
2009-10-07 13:26:02
+3
A:
I prefer ReSharper for this, but if you're looking for a free product, Microsoft FxCop will identity unused public methods.
Brad Tutterow
2009-10-07 14:11:58
We have used ReSharper, but no longer have a license for it so I checked out FxCop and it looks like it will only work on compiled assemblies and not code. I'll have to read more about it to make sure I am not missing something.
Scott
2009-10-08 15:59:28
I didn't mention this before, but this is needed for a ASP c# web application so I don't have any compiled assemblies. Only .cs files and .aspx.cs files
Scott
2009-10-08 16:08:16