Using directives selected in the wrong order

I am using the Power Commands extension with Visual Studio 2012. I have the option to delete and sort messages when saving. The problem is that the System.Xxx directives are sorted last and cause a style parsing error:

SA1208: System directives must be placed before all other directives.

Before saving:

using System; using System.Diagnostics.CodeAnalysis; using Foo; 

After saving:

 using Foo; using System; using System.Diagnostics.CodeAnalysis; 

This worked correctly (System.Xxx first) with VS 2010. Does anyone know how to fix this?

Note. Even if this did not cause the SA error, I would prefer the system directives to be first.

+56
c # visual-studio-2012 powercommands
Oct 03 '12 at 19:20
source share
1 answer

Go to “Quick Launch” (Ctrl + Q) and type “using” and press Enter .

Then change the following setting:

Using Sorting option

This is an annoying default option, I have no idea why Microsoft chose this, it contradicts all the previous standards that I have ever seen.

EDIT: Thanks to Oskar , we have a reason :

The reason for changing the default behavior is because Windows App Store applications prefer to have "Windows." on top of the file, not "System".

+119
03 Oct '12 at 19:26
source share



All Articles