views:

575

answers:

4

Is there a quick way to determine whether you are using certain namespaces in your application. I want to remove all the unneccessary using statements like using System.Reflection and so on, but I need a way to determine if I am using those libraries or not. I know that the tool Resharper does this for you, but is there a quick and dirty and Free way to do this?

+12  A: 

Visual Studio 2008 will also do this for you, right click in your class file and select "Organize Usings" -> "Remove and Sort".

Quintin Robinson
+2  A: 

VS2008 can do this on a per-file basis.

Right-click the source code, select "Organize Usings", "Remove Unused Usings".

Timbo
+8  A: 

Visual Studio 2008 + PowerCommmands = Remove and Sort usings across a whole solution.

Anthony Mastrean
Yes I miss PowerCommands, I learned the hard way that PowerCommands and the MVC CTP5 don't play nice always.
Quintin Robinson
PowerCommands and WPF don't play nice together either.
Kyralessa
+1  A: 

I just noticed your vs2008 tag, but for those who don't have VS2008, you can get a similar feature in Resharper.

Brian Rasmussen