title: Controllers not called anymore after upgrading from ASP.NET Core 2.0 to 2.2
body: <p>I updated a simple ASP.NET Core project from 2.0 to 2.2, updating references. This project (only) uses MVC controllers with <code>Route</code> attributes.</p>
  
  <p>After the update, routes are never found. All HTTP requests end up with 404.</p>
  
  <p>I tested many combinations of <code>.SetCompatibilityVersion(...)</code>, without any luck. From what I could read about such an update, I did not expect any other changes to be required.</p>
  
  <p>I tried to compare with a new "webapi" project. The only differences I see is the absence of <code>UseHsts()</code> and <code>UseHttpsRedirection</code> in Startup, no <code>[ApiController]</code> attribute on controllers, and controllers deriving from <code>Controller</code> instead of its base <code>ControllerBase</code>. I don't see how this explains why controllers are not called, and would have expected all this to work "as is".</p>
  
  <p>A controller:</p>
  
  <pre class="lang-cs prettyprint-override"><code>    [Route("/")]
      public class RootController : Controller
      {
          private readonly ILogger _logger;
  
          public RootController(ILogger&lt;RootController&gt; logger)
          {
              _logger = logger;
          }
  
          [HttpGet]
          public IActionResult Index()
          {
              _logger.LogInformation("Ping received!");
              return new OkResult();
          }
      }
  </code></pre>
  
  <p>The Startup:</p>
  
  <pre class="lang-cs prettyprint-override"><code>        public void ConfigureServices(IServiceCollection services)
          {
              // Unrelated stuff
  
              services.AddMvc()
                  .SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
  
              // More unrelated stuff
          }
  
          public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
          {
              if (env.IsDevelopment())
              {
                  app.UseDeveloperExceptionPage();
              }
  
              app.UseMvc();
          }
  </code></pre>
  
  <p>Where should I look at?</p>
  
  <p><strong>EDIT</strong>: The <code>"Microsoft.AspNetCore.All</code> was actually changed from 2.0.7 (with a 2.1 target framework) to no version (with a 2.2 target framework) in the project. When compiling and running with 2.0, controllers get called.</p>