2

Is seems Re-sharper is constantly alphabetically ordering my fields on code clean up, could anyone tell me how I can stop this and just leave the fields in the order they were before the code cleanup?

1 Answer 1

2

You can change the way things get ordered in Options -> c# -> File Layout, then choose the element type, and adjust the Sort By

enter image description here

3
  • On "Sort By" I don't have a dropdown list, all I have is just an empty field that it wont let me click? Here is a screenshot example: i.imgur.com/CdzVtSY.png
    – spart
    Jan 20, 2018 at 23:01
  • That's a head-scratcher... The screenshot in my answer is from my PC right now... My only other suggestion is not to run the full code cleanup, just the reformat code
    – Erresen
    Jan 20, 2018 at 23:08
  • 1
    @spart it is a known issue in the latest ReSharper build youtrack.jetbrains.com/issue/RSRP-467675, will be fixed soon. Till the fix is available, you might open XAML presentation of the layout (XAML link at the top of the page), look for 'Entry DisplayName="Fields"' block and remove "Name" record from "Entry.SortBy" block. Jan 22, 2018 at 10:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.