title: User.config corruption
body: <p>So I've done quite a bit of research on trying to figure this issue out but can't seem 1) Reproduce the issue, but more importantly 2) Find an update-to-date solution for fixing it. </p>
  
  <p>It's already happened twice within a span of 2 weeks where randomly the user.config file will get corrupted (e.g. there will be missing chunks of the XML file) and thus result in an application crash on next startup.</p>
  
  <p>Cliffnotes:</p>
  
  <ol>
  <li><p>I need an up-to-date solution for dealing with this issue programmatically(i.e. whether it's the post from <a href="https://www.codeproject.com/Articles/30216/Handling-Corrupt-user-config-Settings" rel="noreferrer">CodeProject Handling Of Corrupted User Config</a> or a different post</p></li>
  <li><p>I also need a reproducible case for "corrupting" the user.config file (aside from deleting out chunks of it, as it did not work for me) to be able test #1 above.</p></li>
  </ol>
  
  <p>Solutions I've come across:</p>
  
  <ol>
  <li><p>I know that you can manually navigate to the crazy path (.../AppData/..././1.0.0.0/user.config) and delete it and re-run the application, however, this is not an appropriate solution for us. We need to be able to programmatically catch this error, and deal with it accordingly. If possible, it'd be best to not have to restart the application.</p></li>
  <li><p>I've found a few posts/answers, that are slightly different versions of this article <a href="https://www.codeproject.com/Articles/30216/Handling-Corrupt-user-config-Settings" rel="noreferrer">CodeProject Handling Of Corrupted User Config</a>
  where they use either the same mechanism as that link, or use a ConfigurationManager command to open the config file and catch the exception.</p></li>
  </ol>
  
  <p>What I've tried:</p>
  
  <ol>
  <li><p>One of my problems is that I cannot seem to access the ConfigurationManager class in C# 4.5.2. But MSDN docs say that it's available in the current framework. So I couldn't really try </p></li>
  <li><p>When I try and manually "corrupt" my user.config file to test my solutions, it gives me no issues, and the application works fine...which is alarming, as I can't find a reproducible case to test whether or not the given solution works (i.e. the one provided in the link above that does NOT use ConfigurationManager)</p></li>
  </ol>
  
  <p>Any help would be greatly appreciated!</p>