Resharper File Layout problem Follow
Using registered/purchased Resharper 2022.1.2 Build 221.0.20220601.154737
I'm trying to modify the file layout configuration to control the access order and I'm having zero luck with it. I know the changes I make are having an effect because I can modify the .cs file and then reapply the layout and it consistently puts it back to the order I do not want.
What I want is to more or less reverse the order of methods when I do a Code Cleanup and have private protected public, in that order and to that intent I have the following in my file layout xaml (with information provided from an older post here):
<Region Name="Methods">
<Group DisplayName="Group">
<Group.GroupBy>
<Access/>
<Name/>
</Group.GroupBy>
<Entry DisplayName="Methods">
<Entry.Match>
<Kind Is="Method"/>
</Entry.Match>
<Entry.SortBy>
<Access Order="Internal Private Protected Public ProtectedInternal"/>
</Entry.SortBy>
</Entry>
<Entry DisplayName="All other members">
<Entry.SortBy>
<Access Order="Internal Private Protected Public ProtectedInternal"/>
</Entry.SortBy>
</Entry>
</Group>
</Region>
Despite this the order is constantly changed to public protected private. Any suggestions on what I'm doing wrong?
Please sign in to leave a comment.
Hello,
Please try changing the XAML sample you've specified with the following one:
Please let me know how it works for you.
Thank you.
That does appear to work, thank you. I am having some further problems though, is there a web page that documents the options available in the XAML file?
We have no such document. I'd suggest using File Layout GUI option, we have a detailed article for that - https://www.jetbrains.com/help/resharper/File_and_Type_Layout.html.
If you experiencing any other issues please let me know, I'll gladly assist you.