title: Read from App.config in a Class Library project
body: <p>I am developing a simple <strong>class library</strong> project, which will give me a dll.</p>
  
  <p>I wanted a particular value to be read from a config file. So I have added an App.config file to my project.</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;configuration&gt;
  
    &lt;appSettings&gt;
    &lt;add key="serviceUrl" value="test value" /&gt;
    &lt;/appSettings&gt;
  
    &lt;/configuration&gt;
  </code></pre>
  
  <p>Above is my App.config file, and now I am trying to read it as following</p>
  
  <pre><code>  string strVal = System.Configuration.ConfigurationManager.AppSettings["serviceUrl"];
  </code></pre>
  
  <p>But I am not getting any value in my string variable.</p>
  
  <p><img src="https://i.stack.imgur.com/isro4.png" alt="enter image description here"></p>
  
  <p>I had done this for a web application in a similar way and it worked. 
  But somehow I am not able to get this working.</p>
  
  <p>Is the idea of having App.config in a class library project correct in the first place ?</p>