title: The constraint reference 'string' could not be resolved to a type. (netcoreapp3.0)
body: <p>I have got an error. This is my Startup class.</p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {
      services.AddControllers();
  }
  
  public void Configure(IApplicationBuilder app)
  {
      app.UseDeveloperExceptionPage();
  
      app.UseRouting();
      app.UseEndpoints(endpoints =&gt;
      {
          endpoints.MapControllers();
      });
  }
  </code></pre>
  
  <p>Current technology "netcoreapp3.0" and my controller is.</p>
  
  <pre><code>[Route("api/[controller]")]
  [ApiController]
  public class ExampleController : ControllerBase
  {
      [HttpGet("request")]
      public ActionResult Index()
      {
          return Ok();
      }
  }
  </code></pre>
  
  <p>And here is my error. I couldn't find a solution, I even didn't get what exactly this is. So here we are.</p>
  
  <pre><code>System.InvalidOperationException: The constraint reference 'string' could not be resolved to a type. Register the constraint type with 'Microsoft.AspNetCore.Routing.RouteOptions.ConstraintMap'.
     at Microsoft.AspNetCore.Routing.DefaultParameterPolicyFactory.Create(RoutePatternParameterPart parameter, String inlineText)
     at Microsoft.AspNetCore.Routing.ParameterPolicyFactory.Create(RoutePatternParameterPart parameter, RoutePatternParameterPolicyReference reference)
     at Microsoft.AspNetCore.Routing.Matching.DfaMatcherBuilder.CreateCandidate(Endpoint endpoint, Int32 score)
     at Microsoft.AspNetCore.Routing.Matching.DfaMatcherBuilder.CreateCandidates(IReadOnlyList`1 endpoints)
     at Microsoft.AspNetCore.Routing.Matching.DfaMatcherBuilder.AddNode(DfaNode node, DfaState[] states, Int32 exitDestination)
     at Microsoft.AspNetCore.Routing.Matching.DfaMatcherBuilder.AddNode(DfaNode node, DfaState[] states, Int32 exitDestination)
     at Microsoft.AspNetCore.Routing.Matching.DfaMatcherBuilder.&lt;AddNode&gt;g__Transition|19_0(DfaNode next, &lt;&gt;c__DisplayClass19_0&amp; )
     at Microsoft.AspNetCore.Routing.Matching.DfaMatcherBuilder.AddNode(DfaNode node, DfaState[] states, Int32 exitDestination)
     at Microsoft.AspNetCore.Routing.Matching.DfaMatcherBuilder.AddNode(DfaNode node, DfaState[] states, Int32 exitDestination)
     at Microsoft.AspNetCore.Routing.Matching.DfaMatcherBuilder.AddNode(DfaNode node, DfaState[] states, Int32 exitDestination)
     at Microsoft.AspNetCore.Routing.Matching.DfaMatcherBuilder.AddNode(DfaNode node, DfaState[] states, Int32 exitDestination)
     at Microsoft.AspNetCore.Routing.Matching.DfaMatcherBuilder.Build()
     at Microsoft.AspNetCore.Routing.Matching.DataSourceDependentMatcher.CreateMatcher(IReadOnlyList`1 endpoints)
     at Microsoft.AspNetCore.Routing.DataSourceDependentCache`1.Initialize()
     at System.Threading.LazyInitializer.EnsureInitializedCore[T](T&amp; target, Boolean&amp; initialized, Object&amp; syncLock, Func`1 valueFactory)
     at System.Threading.LazyInitializer.EnsureInitialized[T](T&amp; target, Boolean&amp; initialized, Object&amp; syncLock, Func`1 valueFactory)
     at Microsoft.AspNetCore.Routing.Matching.DataSourceDependentMatcher..ctor(EndpointDataSource dataSource, Lifetime lifetime, Func`1 matcherBuilderFactory)
     at Microsoft.AspNetCore.Routing.Matching.DfaMatcherFactory.CreateMatcher(EndpointDataSource dataSource)
     at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.InitializeCoreAsync()
  --- End of stack trace from previous location where exception was thrown ---
     at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.&lt;Invoke&gt;g__AwaitMatcher|8_0(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task`1 matcherTask)
     at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
  </code></pre>
  
  <p>EDIT: There is my dependencies. When I remove these then it worked.</p>
  
  <pre><code>&lt;PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.0.0" /&gt;
  &lt;PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.0" /&gt;
  &lt;PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.0" /&gt;
  &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.0"&gt;
    &lt;PrivateAssets&gt;all&lt;/PrivateAssets&gt;
    &lt;IncludeAssets&gt;runtime; build; native; contentfiles; analyzers; buildtransitive&lt;/IncludeAssets&gt;
  &lt;/PackageReference&gt;
  &lt;PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0" /&gt;
  &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0"&gt;
    &lt;PrivateAssets&gt;all&lt;/PrivateAssets&gt;
    &lt;IncludeAssets&gt;runtime; build; native; contentfiles; analyzers; buildtransitive&lt;/IncludeAssets&gt;
  &lt;/PackageReference&gt;
  &lt;PackageReference Include="Microsoft.Extensions.Caching.SqlServer" Version="3.1.0" /&gt;
  &lt;PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.0.0" /&gt;
  &lt;PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.0.0" /&gt;
  &lt;PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="5.0.0-rc4" /&gt;
  &lt;PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="5.0.0-rc4" /&gt;
  &lt;PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="3.0.24" /&gt;
  &lt;PackageReference Include="Newtonsoft.Json" Version="12.0.3" /&gt;
  &lt;PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc4" /&gt;
  </code></pre>