Monday, February 15, 2010

Limit the number of namespaces used in your .net project of VS

How to limit the number of namespaces included in your .net project in VS?

Method 1:

it involves changing the default project item templates. You can find them in %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates (for Visual Studio 2008). You may need to
clear out \Common7\IDE\ItemTemplatesCache before Visual Studio picks up your changes, although it should do this automatically.

Be careful and make sure to backup these directories first, because damaging them will render you unable to add new items from Visual Studio.

Not sure whether VS Express support this feature!

Method2:

Right click your code in the editor, and on the context menu, select "Organize Usings", then on the pop-out, select "Remove Unused Usings".

No comments: