Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • This was also true for me in .Net Core 5.0.0-preview.4
    – Brian C
    Commented Jun 5, 2020 at 15:09
  • 5
    In Core 3.1 and Swagger 5.5.1 I had to add services.AddControllers(); and also endpoints.MapControllers();.
    – dpant
    Commented Aug 8, 2020 at 14:13
  • 1
    The ASP.NET Core documentation seems to indicate that AddControllers(); and maybe AddEndpointsApiExplorer(); should be enough: learn.microsoft.com/en-us/aspnet/core/tutorials/… Commented Nov 17, 2022 at 9:39