title: How to use ConfigurationManager
body: <p>I want to use App.config for storing some setting.
  I tried to use the next code for getting a parameter from a config file.</p>
  <pre class="lang-cs prettyprint-override"><code>private string GetSettingValue(string paramName)
  {
      return String.Format(ConfigurationManager.AppSettings[paramName]);
  }
  </code></pre>
  <p>I also added <code>System.Configuration</code> for it (I used a separate class), and in App.config file I have:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
  &lt;configuration&gt;
    &lt;startup&gt; 
      &lt;supportedRuntime version=&quot;v4.0&quot; sku=&quot;.NETFramework,Version=v4.5&quot; /&gt;
    &lt;/startup&gt;
    &lt;appSettings&gt;
      &lt;add key =&quot;key1&quot; value =&quot;Sample&quot; /&gt;
    &lt;/appSettings&gt;
  &lt;/configuration&gt;
  </code></pre>
  <p>But I got an error while trying to use <code>ConfigurationManager</code> - <code>ConfigurationManager can't exist in such context</code>, but I already added <code>System.Configuration</code>. Or did I miss something?</p>
  <p><strong>EDIT</strong>:</p>
  <p>class with config (full view)</p>
  <pre class="lang-cs prettyprint-override"><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Configuration;
  
  namespace browser
  {
      class ConfigFile
      {
          private string GetSettingValue(string paramName)
          {
              return String.Format(ConfigurationManager.AppSettings[paramName]);
          }
      }
  }
  </code></pre>
  <p><strong>EDIT2</strong></p>
  <p>Add how it looks</p>
  <p><img src="https://i.stack.imgur.com/BN0Tq.png" alt="enter image description here" /></p>
  <p>This means the problem is not during using <code>ConfigurationManger</code> but before - the program &quot;says&quot; that it &quot;doesn't know such element&quot; as I understand the error - the &quot;Element ConfigurationManager&quot; doesn't exist in such context&quot;</p>
  <p><strong>EDIT3</strong></p>
  <p><img src="https://i.stack.imgur.com/rjG9K.png" alt="enter image description here" /></p>
  <p><strong>EDIT 4</strong></p>
  <p><img src="https://i.stack.imgur.com/mUiJq.png" alt="enter image description here" /></p>