title: Can ConfigurationManager retain XML comments on Save()?
body: <p>I've written a small utility that allows me to change a simple AppSetting for another application's App.config file, and then save the changes:</p>
  
  <pre><code> //save a backup copy first.
   var cfg = ConfigurationManager.OpenExeConfiguration(pathToExeFile);
   cfg.SaveAs(cfg.FilePath + "." + DateTime.Now.ToFileTime() + ".bak"); 
  
   //reopen the original config again and update it.
   cfg = ConfigurationManager.OpenExeConfiguration(pathToExeFile);
   var setting = cfg.AppSettings.Settings[keyName];
   setting.Value = newValue;
  
   //save the changed configuration.
   cfg.Save(ConfigurationSaveMode.Full); 
  </code></pre>
  
  <p>This works well, except for one side effect. <strong>The newly saved .config file loses all the original XML comments, but only within the AppSettings area.</strong> Is it possible to to retain XML comments from the original configuration file AppSettings area? </p>
  
  <p><em><a href="http://csharp.pastebin.com/f24ee02a8" rel="noreferrer">Here's a pastebin of the full source if you'd like to quickly compile and run it.</a></em></p>