11

How to remove unsed using statements for a whole project?

I could not find a shortcut or menu item to remove ALL unused using statements at once for a whole project. If someone knows about such an option I would be glad to hear.

John Threepwood
  • 15,593
  • 27
  • 93
  • 149
  • It could be done using [Roslyn](http://msdn.microsoft.com/en-gb/roslyn), like mentioned [here](http://stackoverflow.com/questions/9913994/sort-and-remove-unused-using-statements-roslyn-script-code). I am not sure if a solution already exists. – vgru Sep 12 '13 at 12:06
  • I have this option ... I'm looking which extension add this ... – Xaruth Sep 12 '13 at 12:14
  • This question has been asked and answered. Find the answer [here][1] [1]: http://stackoverflow.com/questions/283471/is-there-anyway-to-remove-unused-namespaces-across-a-whole-project-or-solution-a – Hayes Helen Sep 12 '13 at 12:17
  • 2
    "Productivity Power Tools 2012" add an action in project right-clic menu "Remove and Sort Usings". You can also use "Code Maid" extension, that allow to remove andsort usings and clean your code. – Xaruth Sep 12 '13 at 12:17

1 Answers1

11

You can add "Productivity Power Tools 2012" extension, that will add an action in contextual menu of the project "Remove and Sort Usings"

Xaruth
  • 4,034
  • 3
  • 19
  • 26