title: Can I make configuration required in ASP.NET Core?
body: <p>Here is my startup code:</p>
  <pre><code>services.Configure&lt;FooBarOptions&gt;(Configuration.GetSection(&quot;FooBarOptions&quot;));
  </code></pre>
  <p>The was a mistake, as I wanted</p>
  <pre><code>services.Configure&lt;FooBarOptions&gt;(Configuration.GetSection(&quot;FooBar&quot;));
  </code></pre>
  <p>Obviously the typo cause the configuration to not be loaded. Is there a way to trigger an error during startup when a required config section doesn't exist?</p>