How to automatically "reorder using statements" ?

Hello,

 

When I import something, the using import automatically goes at the very top of the file, above the namespace.

When I go on it it shows me a warning and suggests reorder using statements”, which puts the namespace on top (which is what I want) and orders the usings under.

Any way to have this directly so I don't have to manually done it? Couldn't find anything in the settings 

0
1 comment

If you see “warning” for resorting the using directives, it means that it's not from Rider. Do you have StyleCop or EditorConfig configured for the project? You can share the screenshots of the notification.

You can achieve this in many ways. 

  1. Refer to the suggestions in the Context Menu. 

  2. Run Code Cleanup for the solution. You can configure the code cleanup on save.
  3. Use EditorConfig to apply style and formatting rules automatically.
0

Please sign in to leave a comment.