title: error in Microsoft.Extensions.Configuration
body: <p>Was trying to follow a tutorial here for a console app <a href="https://www.connectionstrings.com/store-and-read-connection-string-in-appsettings-json/" rel="nofollow noreferrer">https://www.connectionstrings.com/store-and-read-connection-string-in-appsettings-json/</a></p>
  <p>So in my appsettings-json i have:</p>
  <pre><code>{
    &quot;ConnectionStrings&quot;: {
      &quot;myDb1&quot;: &quot;Server=myServer;Database=myDb1;Trusted_Connection=True;&quot;,
    }
  }
  </code></pre>
  <p>My program:</p>
  <pre><code>using System;
  using Microsoft.Extensions.Configuration;
  
  namespace mynamespace 
  {
      class Program
      {
          string myDb1ConnectionString = _configuration.GetConnectionString(&quot;myDb1&quot;);
  
          static void Main(string[] args)
          {
              ... 
          }
      }
  }
  </code></pre>
  <p>The error I get is : &quot;The name '_configuration' does not exist in the current context&quot;.</p>