Before .NET 6 Minimal API’s you had 2 places where you had to apply some changes to replace the built-in IoC container with Autofac.
First in your Program.cs file:
And second in your Startup.cs file:
But what should you do when using .NET 6 Minimal API’s? In that case your Startup.cs file is gone.
You still need to apply the same 2 steps but this time directly on the Host property of the WebApplicationBuilder:
Remark: I assume that the process is quite similar for other 3th party IoC containers.