3

Is there an easy way to remove unused using namespaces from the entire project or solution?

I know that you can remove the unused namespace of a particular class by

right click on using namespace statements >> Ogranize Usings >> Remove Unused Usings

But doing this for each and every class of the solution would be very tiresome.

I guess Resharper also allows doing this, but we are not using this tool.

Yogi
  • 9,174
  • 2
  • 46
  • 61

1 Answers1

4

Unfortunately Visual Studio does not offer this functionality. However there are extensions (other than Resharper) that do it, take a look for example at Productivity Power Tools (it's free).

Konamiman
  • 49,681
  • 17
  • 108
  • 138
  • 2
    This is a good extension to recommend. To remove unused namespaces, just right on project/solution >> Power Commands >> Remove and Sort using. It also provide many useful features also which I've yet to explore. – Yogi Jun 11 '15 at 06:56
  • This tool not supporting latest version of visual studio. can suggest any alternative? – Biju Kalanjoor Sep 25 '22 at 05:06