title: ,net core 3.1 AddAuthorization method not found
body: <p>I'm migrating from .net core 2.2 to 3.1 but I got this error in runtime</p>
  <p>System.MissingMethodException: 'Method not found: 'Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.AuthorizationServiceCollectionExtensions.AddAuthorization(Microsoft.Extensions.DependencyInjection.IServiceCollection, System.Action`1&lt;Microsoft.AspNetCore.Authorization.AuthorizationOptions&gt;)'.'</p>
  <p>I made sure that I include all the needed nuget libraries</p>
  <pre><code>&lt;ItemGroup&gt;
      &lt;PackageReference Include=&quot;Microsoft.AspNetCore.Authorization&quot; Version=&quot;3.1.12&quot; /&gt;
      &lt;PackageReference Include=&quot;Microsoft.Extensions.DependencyInjection&quot; Version=&quot;6.0.0-preview.2.21154.6&quot; /&gt;
      &lt;PackageReference Include=&quot;Signed.IdentityModel.AspNetCore.OAuth2Introspection&quot; Version=&quot;3.5.0&quot; /&gt; 
      &lt;PackageReference Include=&quot;Newtonsoft.Json&quot; Version=&quot;13.0.1&quot; /&gt;
      &lt;PackageReference Include=&quot;System.Text.Encoding.CodePages&quot; Version=&quot;5.0.0&quot; /&gt; 
      &lt;PackageReference Include=&quot;Microsoft.AspNetCore.SpaServices.Extensions&quot; Version=&quot;2.0.0&quot; /&gt;
  &lt;/ItemGroup&gt;
  </code></pre>
  <p>I even tried adding ( not convinced it's needed)</p>
  
      
  
  <p>and in startup</p>
  <pre><code> services.AddMvc(options =&gt; {
                  options.AddOAuth2AuthorizationPolicy(); 
              });
  services.AddAuthorization();
  </code></pre>
  <p>not sure what's missing</p>