ASP.NET Core support and helpers for Autofac.
This package is not officially published yet.
If you're feeling adventurous, continuous integration builds are on MyGet. As it is currently very small there is no value in publishing it yet. It may never be published. YOU HAVE BEEN WARNED.
Need help with Autofac? We have a documentation site as well as API documentation. We're ready to answer your questions on Stack Overflow or check out the discussion forum.
The Autofac implementation of the IServiceProviderFactory
interface can be used by calling the UseAutofac
extension method on an IWebHostBuilder
instance.
var host = new WebHostBuilder()
.UseAutofac()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build();
host.Run();
Our ASP.NET Core integration documentation contains more information about using Autofac with ASP.NET Core.
Autofac is licensed under the MIT license, so you can comfortably use it in commercial applications (we still love contributions though).
Refer to the Readme for Autofac Developers for setting up and building Autofac source. We also have a contributors guide to help you get started.