Visual Studio 2008 got two great features for c#, which is called "sort using directives" and "remove unused using directives".
I'd like to call the "sort using directives" every time I format the code using ctrl+k,ctrl+d.
Or, even better, I would like to be able to reformat all c#-source files in a project, and call "sort using directives" for all source files.
How can I do this? Opening every cs-file by hand and typing these functions before every checkin is tedious!
You can do it all for a solution or project using "PowerCommands for Visual Studio 2008". After installation, you just need to right-click on a project or solution and "Remove and Sort Usings" is in the context menu.
EDIT: As noted in comments, there are also PowerCommands for Visual Studio 2010.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With