title: How to Make Application.Properties.Settings public and stay that way
body: <p>I am in the process of centralizing my application settings into one location and I've chosen to use the the Settings collection in my common library to do so.</p>
  
  <p>I have moved all these settings into their own file that gets pulled into my app.config using config source:</p>
  
  <pre><code>&lt;Common.Properties.Settings configSource="config\Common.Properties.Settings.config" /&gt;
  </code></pre>
  
  <p>This allows me to use the "Add Link" capability of Visual Studio to override the default library settings with the imported config file within my web and test applications.</p>
  
  <p>Now, I want to be able to access all of these great Settings values from within my other libraries, and have found that I can do so simply by making the generated class public:</p>
  
  <p>File: Common.Properties.Settings</p>
  
  <pre><code>public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
  </code></pre>
  
  <p>This lets me get access to things like <code>Common.Properties.Settings.Default.MySetting</code> from within my web application or unit tests.  However, the problem is that whenever a new setting is added, the Setting.settings file is regenerated by Visual Studio, and flips the Settings class back to internal:</p>
  
  <pre><code>internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
  </code></pre>
  
  <p>So my question is whether anyone knows of a way to override this, or perhaps suggest a macro approach or some other method to ensure that after the Settings.settings file is rebuilt, this class is set to public.</p>
  
  <p>Thanks!</p>