In CTP version, I used to write below code to save the changes to file with the formatting. Any idea what is changed in RTM?
IEnumerable<IFormattingRule> rules = FormattingRules.GetDefaultRules("C#");
File.WriteAllText(
filePath,
modifiedTree.Format(FormattingOptions.GetDefaultOptions(), rules).GetFormattedRoot().ToFullString());