private void FormatDocument(string tempDirectoryName) { string data = System.IO.File.ReadAllText($"{tempDirectoryName}\\web.config"); var doc = XDocument.Parse(data); doc.Save($"{tempDirectoryName}\\web.config"); }