title: Read config properties from another project in the same solution C#
body: <p>I have a solution named <strong>WebServiceProject</strong>.</p>
  
  <p>Inside this solution I have three projects:</p>
  
  <ul>
  <li><strong>Common</strong> <em>(Class Library)</em></li>
  <li><strong>UserInterface</strong> <em>(WinForms Project)</em></li>
  <li><strong>WebService</strong> <em>(WCF Service Project)</em></li>
  </ul>
  
  <p>In the <strong>WebService</strong> project I have an <code>app.config</code> file with this content:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b72a5b561321d079"&gt;
        &lt;section name="WebService.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b72a5b561321d079" requirePermission="false"/&gt;
      &lt;/sectionGroup&gt;
    &lt;/configSections&gt;
    &lt;startup&gt;
    &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/&gt;&lt;/startup&gt;
    &lt;appSettings&gt;
      &lt;add key="ConnectionString" value="mydatabase@localhost"/&gt;
    &lt;/appSettings&gt;
    &lt;system.serviceModel&gt;
      &lt;bindings/&gt;
      &lt;client/&gt;
    &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>In the <strong>WebService</strong> project I execute some scheduled routine calling the <strong>Common</strong> project classes reading the <code>ConnectionString</code> from <code>app.config</code> file:</p>
  
  <pre><code>if (!string.IsNullOrEmpty(ConfigurationManager.AppSettings["ConnectionString"]))
  {
      // I do something
  }
  </code></pre>
  
  <p>If I start the <strong>WebService</strong> alone everything works fine.</p>
  
  <p>Inside the <em>WinForms</em> project <strong>UserInterface</strong>, I have a button that start the routine inside the <strong>Common</strong> project as the <strong>WebService</strong> does.</p>
  
  <p>But if I "<em>Set as StartUp project</em>" the <strong>UserInterface</strong> project the previous piece of code <code>ConfigurationManager.AppSettings["ConnectionString"]</code> throw an error, because I didn't specified the <code>ConnectionString</code> in the <code>app.config</code> in <strong>UserInterface</strong> project.</p>
  
  <p>So, my question is: how can I read the <code>ConnectionString</code> property from the <strong>WebService</strong> project event if I "<em>Set as StartUp project</em>" the <strong>UserInterface</strong> project? More in general, how can I read an <code>app.config</code> property from another project different from the executed one?</p>