Having recently discovered that some of the people I've been working with were manually making these changes every time, I highlighted the settings that will do this for you.
Hopefully documenting this here will help other too.
To have Visual Studio put “System” using directives first:
Tools > Options > Text Editor > C# > Advanced > “Organize Usings” > “Place ‘System’ directives first when sorting usings”
To have ReSharper (if you’re using it) put new using directives inside the namespace:
ReSharper > Options > Code Editing > C# > Namespace Imports > “Insert using directives when necessary” > “Add using directive to the deepest scope”
Thanks. This article is very useful with me. It's good for my work.
ReplyDelete