title: c# properties/settings not defined after changing project name and namespace
body: <p>I am updating an old application built several years ago and the global namespace and, project.cs file, and the main form were all named as <code>email2case_winForm</code></p>
  
  <p>I wanted to change this (alongside rebuilding the application in more of an OOP way to make it more flexible, and to be able to re-use code), so changed the names to <code>email2case</code></p>
  
  <p>But now I am having trouble compiling because when reading the settings and properties of the project, those members cannot be found.</p>
  
  <p>Here is an example of the code I am trying to use to read the properties.Settings:</p>
  
  <pre><code>XElement x = XElement.Load(email2case.Properties.Settings.Default.e2cConfigFile);
  </code></pre>
  
  <p>and the compiler error for that one is:</p>
  
  <blockquote>
    <p>'email2case.email2case' does not contain a definition for 'Properties'    </p>
  </blockquote>
  
  <p>Here is how a class is reading from the global settings:</p>
  
  <pre><code>this.Url = global::email2case.Settings.Default.email2case_sforce_SforceService;
  </code></pre>
  
  <p>and the compiler error for that one is:</p>
  
  <blockquote>
    <p>The type or namespace name 'Settings' does not exist in the namespace 'email2case' (are you missing an assembly reference?)</p>
  </blockquote>
  
  <p>I have a hunch that the problem is caused by the definitions in <code>app.Config</code> and here it is:</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;configSections&gt;
          &lt;sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"&gt;
              &lt;section name="email2case.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/&gt;
              &lt;section name="email2case.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/&gt;
          &lt;/sectionGroup&gt;
          &lt;sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" &gt;
              &lt;section name="email2case.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /&gt;
          &lt;/sectionGroup&gt;
      &lt;/configSections&gt;
      &lt;applicationSettings&gt;
        &lt;email2case.Properties.Settings&gt;
          &lt;setting name="email2case_sforce_SforceService" serializeAs="String"&gt;
            &lt;value&gt;https://login.salesforce.com/servi...&lt;/value&gt;
          &lt;/setting&gt;
          &lt;setting name="e2cConfigFile" serializeAs="String"&gt;
            &lt;value&gt;C:\email2case\data\e2cConfig.xml&lt;/value&gt;
          &lt;/setting&gt;
        &lt;/email2case.Properties.Settings&gt;
        &lt;email2case.Properties.Settings&gt;
          &lt;setting name="email2case_sforce_SforceService" serializeAs="String"&gt;
            &lt;value&gt;https://login.salesforce.com/serv...&lt;/value&gt;
          &lt;/setting&gt;
        &lt;/email2case.Properties.Settings&gt;
      &lt;/applicationSettings&gt;
      &lt;system.serviceModel&gt;
          &lt;bindings/&gt;
          &lt;client/&gt;
      &lt;/system.serviceModel&gt;
      &lt;startup&gt;
        &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/&gt;&lt;/startup&gt;&lt;userSettings&gt;
          &lt;email2case.email2case.Properties.Settings&gt;
              &lt;setting name="enableEWSTrace" serializeAs="String"&gt;
                  &lt;value&gt;False&lt;/value&gt;
              &lt;/setting&gt;
              &lt;setting name="attachmentsPathLocal" serializeAs="String"&gt;
                  &lt;value&gt;C:\email2case\temp\&lt;/value&gt;
              &lt;/setting&gt;
              &lt;setting name="eTracePath" serializeAs="String"&gt;
                  &lt;value&gt;C:\email2case\Trace\&lt;/value&gt;
              &lt;/setting&gt;
              &lt;setting name="ewsTraceKeepDays" serializeAs="String"&gt;
                  &lt;value&gt;1&lt;/value&gt;
              &lt;/setting&gt;
          &lt;/email2case.email2case.Properties.Settings&gt;
      &lt;/userSettings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I don't want to go editing that without knowing exactly the right way to do it, so what code should I use to reference my properties and settings?</p>
  
  <p>Or should I alter the way they are defined in the <strong>app.config</strong>?    </p>