Just in case: to prevent ReSharper from adding an empty line after <?xml ver...>, the following setting needs to be turned off: ReSharper | Options | Code Editing | XML | Formatting Style | Processing instructions | Blank Line after processing instructions. Maybe this will be helpful to someone in the future.