ReSharper and xUnit.net
Those of you who have switched over to xUnit.Net may have a received a nasty surprise with the 'type members layout' feature of ReSharper: it doesn't respect method attributes. Namely, you can tell it to not reorder methods in an NUnit fixture like this:
<Pattern>
<Match>
<HasAttribute CLRName="NUnit.Framework.TestFixture"/>
</Match>
</Pattern>
But you cannot tell it to not reorder your xUnit methods like this:
<Pattern>
<Match>
<And Weight="100">
<Kind Is="method"/>
<HasAttribute CLRName="Xunit.TestAttribute" Inherit="false"/>
</And>
</Match>
</Pattern>
Apparently it will only look for attributes on classes and interfaces. In the meantime, I think the simplest solution is to just create a fake attribute you can add to your fixture.
public class ReSharperNoReorderAttribute : Attribute
{
}
And the appropriate pattern match to ReSharper:
<Pattern>
<Match>
<HasAttribute CLRName="ReSharperNoReorder"/>
</Match>
</Pattern>
All should be well after that.