title: How does AppSettings in VB.NET windows Forms work?
body: <p>Hello I have build a small app to demo a concept in C# in which I added the application config file etc added System.Configuration dll to the reference and accessed the settings:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
   &lt;appSettings&gt;
     &lt;add key="username" value="myknownusername"/&gt;
   &lt;/appSettings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>No news It worked flawlessly with the code: </p>
  
  <pre><code>private String username = ConfigurationManager.AppSettings["username"];
  </code></pre>
  
  <p>Now I have been asked to do the port the app to VB.NET and to my biggest surprise. It's been a while that I opened visual studio in VB.NET project. I was surprised to see an already white dashed <code>App.config</code> file so I added my <code>AppSettings</code> section and after 3 hours I still can't get the value of the username using the same ConfigurationManager</p>
  
  <pre><code>Dim username as String = ConfigurationManager.AppSettings("username")
  </code></pre>
  
  <p>I have included another application configuration <code>app1.config</code> which by the way has generated entries already. I could not get anything with the app1.config either.It also returns <code>Nothing</code>
       
       
       
          
            
          
          
                
                  
                
             
             
              
             
             </p>
  
  <pre><code>       &lt;/sharedListeners&gt;
      &lt;/system.diagnostics&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I am really perplexed as how a simple reading of configuration file could be this challenging in VB.NET unless I am using the  wrong method which I always use in C#.</p>
  
  <p>Kindly point me to whatever I am not doing right.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>As you can see in the picture below, I have all it needs to work properly.I as expecting to read the setting key from either App.config or app1.config. When I run like shown below the MessageBox is empty</p>
  
  <p><img src="https://i.stack.imgur.com/74mTE.jpg" alt="screen shot of the project"></p>