title: .Net Native IoC container registration issue on Release mode
body: <p>Application works as it should be on Debug mode.</p>
  <p>On Release mode I am getting exception saying</p>
  <blockquote>
  <p>Exception thrown: 'Autofac.Core.Registration.ComponentNotRegisteredException' in Autofac.dll</p>
  <p>Additional information: The requested service 'Microsoft.Extensions.Options.IOptions`1[[TIKSN.GroceryChecklist.Models.Configuration.HockeyAppConfiguration, Models, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.</p>
  </blockquote>
  <p>This is the line that throws exception</p>
  <pre><code>var hockeyAppOptions = serviceProvider.GetRequiredService&lt;IOptions&lt;HockeyAppConfiguration&gt;&gt;();
  </code></pre>
  <p>But this option is configured and works fine in Debug mode.</p>
  <pre><code>services.Configure&lt;HockeyAppConfiguration&gt;(option =&gt;
          {
              option.AppID = &quot;my key&quot;;
  
          });
  </code></pre>
  <p>I also tried to add type registration line in <em>Default.rd.xml</em> file but it did not work neither.</p>
  <pre><code>&lt;Type Name=&quot;Microsoft.Extensions.Options.IOptions{TIKSN.GroceryChecklist.Models.Configuration.HockeyAppConfiguration}&quot; Dynamic=&quot;Required Public&quot; /&gt;
  </code></pre>