Click here to Skip to main content
15,881,380 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi everyone,

i'm using VS2010 in a webapplication based on FW4

i'm looking for something (free) able to point out unreachable code ( unused methods, unused variable, etcc)

I've installed "productivity power tools" and "web essentials" extensions but they don't (or i don't know hot to make them do) act as i need.

anyone that could help me?

EDIT: i forgot to say VS2010 SP1 :)
Posted
Updated 19-Jan-12 2:20am
v3

1 solution

Resharper[^] is probably the best bet, but if you think a method is unused, you can give it the Obsolete attribute, and you will get a compiler warning each time it is used. This can help to wean people off them, as well as ensuring it it safe to delete when you no longer get warnings:
C#
/// <summary>
/// Load settings from config file
/// </summary>
[Obsolete]
public void LoadSettings()
    {
    ...
    }
 
Share this answer
 
Comments
nrgjack 19-Jan-12 8:19am    
thanks

i saw Resharper but is a 30day trial, is there anything free?

i founded some tool but there are more general tools and i don't know how they works...

i'm mantaining application written by other, so i don't know which cose is actually obsolete or not..
OriginalGriff 19-Jan-12 8:29am    
I would use the trial, and see how I got on. If it really, really helps, then talk to your boss about the company buying a copy.
It's worth having good tools, with good support.
After all, you could do your entire development with Notepad and the csc compiler that ships with the .NET framework. You (and I) just don't want to because the paid-for tools (i.e. VS) save us so much time. :laugh:
nrgjack 19-Jan-12 8:35am    
that's a good point, unfortunately not all companies and bosses are smart enough to put money on tools and developer's training

thanks againg ;)
OriginalGriff 19-Jan-12 8:49am    
They are if you can justify the cost in terms of the time saved.
The cost is not massive: $199 for an individual, or $349 for a company. I don't know how much you are paid, but if you figure that you cost the company at least twice that once you figure floor space, electricity, holidays, employer taxes, etc. it doesn't take many hours to reach that amount of money! Plus, you should be able to factor in increased reliability as a future saving in maintenance costs.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900