title: Settings.settings vs. app.config in .NET desktop app
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/909688/what-is-the-difference-between-app-config-file-and-xyz-settings-file">What is the difference between app.config file and XYZ.settings file?</a>  </p>
  </blockquote>
  
  
  
  <p>I am quite confused by the apparent redundancy of these two mechanisms in Visual Studio to store and manage desktop application settings:</p>
  
  <ul>
  <li>You can use the XML <code>app.config</code> file, adding items to the <code>&lt;appSettings&gt;</code> section. These can be retrieved from code using the <code>ConfigurationManager</code> class.</li>
  <li>Alternatively, you can use the Settings.settings file to add individual settings through an editor. Visual Studio will generate a <code>Settings</code> class for type-safe retrieval of settings at run-time.</li>
  </ul>
  
  <p>These two mechanisms seem to serve the same (or nearly the same) purpose. I am aware there are some differences, but I am also puzzled by the overlap and its consequences. For example, when I use Visual Studio to add settings to the <code>Settings.settings</code> file, all the information that I put in ends up as entries in the <code>app.config</code> file as well. Apparently, a synchronisation mechanism exists: if I change a setting in the <code>app.config</code> file, Visual Studio prompts me to update the <code>Settings.settings</code> file next time I open it up in the editor.</p>
  
  <p>My questions are:</p>
  
  <ul>
  <li>Why two mechanisms and not just one?</li>
  <li>What are the most common scenarios for using <code>app.config</code> over <code>Settings.settings</code>, and vice versa?</li>
  <li>What happens if my app is using <code>Settings.settings</code> and I change a value in <code>app.config</code> after it's been deployed? No syncronisation of <code>Settings.settings</code> can happen since it's already been compiled and distributed.</li>
  </ul>
  
  <p>Note. I have searched for questions on this topic, but I am even more confused. For example, answers to <a href="https://stackoverflow.com/questions/3371433/storing-application-settings-in-c">this question here</a> are quite contradictory and do not shed much light.</p>
  
  <p>Note 2. I am aware that <code>app.config</code> is a design-time file name, and I am familiar with the dynamics of Visual Studio copying and renaming it to the executable folder.</p>