title: Override dll config
body: <p>i have a class library, with domain objects (linq based objects, in .net 
  4.0).
  i want to have this library use connection strings for its own app.config.</p>
  
  <p>there are some problems:
  following the model used by Settings : <strong>ApplicationSettingsBase</strong>, i created a 
  wrapper that should read the settings from app.config.</p>
  
  <p>however, unlike the model, i provide default values.
  the problem is that the properties which should load the data from app.config</p>
  
  <pre><code>  internal sealed class ApplicationSettings : ApplicationSettingsBase
      {
      // other properties
  
          [SpecialSetting( SpecialSetting.ConnectionString )]
         [global::System.Configuration.DefaultSettingValueAttribute("Server=.;Database=RFPLUSSTD;User Id=SYSADM;Password=SYSADM;")]
          public string MainConnectionString
      {
      get { return (string)this["MainConnectionString"]; }
      }
  </code></pre>
  
  <p>// other properties
  }</p>
  
  <pre><code>in app.config:
  &lt;connectionStrings&gt;
  &lt;add name="MainConnectionString"
  connectionString="..."
  providerName="System.Data.SqlClient" /&gt;
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>now, this doesn't work...
  i tried to set the name of the conn string to the fully qualified name like 
  namespace.class.property, but to avail.</p>
  
  <ul>
  <li>i don't want to use the default Settings class, used by the dbml because 
  it compiles the settings :D and i can't change them without recompiling...</li>
  <li>i'm already using a different model of app settings class in a project in 
  1.1, but i thought 3.5 has grown enough and have its own objects, that 
  work..</li>
  </ul>
  
  <p>So, why is not working and how can i make it work?</p>
  
  <p>Thank you</p>