ReSharper + SemanticMerge = Streamlined Development

I wanted to share a setup that has been working well for me for some time in keeping the layout of C# code consistent, easier to maintain and smoother when it comes to merging changes into git. It leverages ReSharper and SemanticMerge, two really awesome tools that allow you to remain focused on delivering features with minimum fuss.

With this setup, a simple keyboard shortcut restructures a C# code file according to defined settings, performing such actions as reordering members according to type, accessibility and name, removing regions, sorting Using directives and updating file headers. When it comes to merging these changes into source control, we can merge with confidence as SemanticMerge parses the C# file to determine changes at the class structural level, meaning we can happily reorder members ‘til our hearts content and let SemanticMerge deal with the fallout of determining the real changes. Enough of the hyperbole, let’s get set up!