Visual Studio or Resharper functionality for placement of using directives

UPDATE - ReSharper 2016.1: This option is now moved to Code Editing → C# → Code Style → Add 'using' directive to the deepest scope

Have you tried the ReSharper option:

Languages → C# → Formatting Style → Namespace Imports → Add using directive to the deepest scope

I'm not sure whether R#'s code cleanup will reorder the existing ones for you though.


In ReSharper 2020, go to Options and then:

Code EditingC#Syntax StyleAdd 'using' directive to deepest scope

enter image description here


As of version 8.2, this has moved. It is now here:

Within Visual Studio
Resharper -> Options...

Then in the Options dialog
Code Editing -> C# -> Namespace Imports -> Insert using directives when necessary -> Add using directive to the deepest scope

enter image description here