Anyone knows any free Visual Studio add-in that would find and/or delete dead (unused) code? I saw such possibility in MZ-Tools, but it's a little expensive as for private use ;)
+1
A:
Depends... For .NET you can use FxCop for finding usused code and variables.
Simon Linder
2010-03-29 09:07:30
Hmm, but FxCop analyzes the managed code. I'm not sure if it would do the thing?
brovar
2010-03-29 09:34:25
You get warnings like: CA1804: Remove unused locales; or CA1811: Avoid uncalled private code; So I would say that is something...
Simon Linder
2010-03-29 09:37:56
Oh, ok, I'll give it a try.
brovar
2010-03-29 09:41:50
+1
A:
You can also install ReSharper. It generally warns about unused variables and methods in a class file. You can see it as you are coding. It underlines it. It does seem to miss a couple but FxCop did seem to find the rest for me.
UPDATE: Sorry didn't see the FREE part. BUT after using ReSharper for a while it is definitely worth the money.
uriDium
2010-03-29 09:16:49
You can at least use it as trial version for some days. I tested it (but didn't buy) and also think that it's really good.
Simon Linder
2010-03-29 09:21:34
I've already heard many good things about Resharper, quite expensive unfortunately.
brovar
2010-03-29 09:43:35