Autofac 9.3.4

Autofac character Autofac logo

Autofac is an IoC container for Microsoft .NET. It manages the dependencies between classes so that applications stay easy to change as they grow in size and complexity. This is achieved by treating regular .NET classes as components.

Build status codecov NuGet

Autofac on Stack Overflow

Get Packages

You can get Autofac by grabbing the latest NuGet package. There are several application integration and extended functionality packages to choose from. If you're feeling adventurous, continuous integration builds are on MyGet.

Release notes are available on GitHub.

Get Help

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.

Get Started

Our Getting Started tutorial walks you through integrating Autofac with a simple application and gives you some starting points for learning more.

Super-duper quick start:

Register components with a ContainerBuilder and then build the component container.

var builder = new ContainerBuilder();

builder.Register(c => new TaskController(c.Resolve<ITaskRepository>()));
builder.RegisterType<TaskController>();
builder.RegisterInstance(new TaskController());
builder.RegisterAssemblyTypes(controllerAssembly);

var container = builder.Build();

Resolve services from a lifetime scope - either the container or a nested scope:

var taskController = container.Resolve<TaskController>();

There is a growing number of application integration libraries that make using Autofac with your application a snap. Support for several popular frameworks is also available through the "Extras" packages.

Intrigued? Check out our Getting Started walkthrough!

Project

Autofac is licensed under the MIT license, so you can comfortably use it in commercial applications (we still love contributions though).

File issues in the repo with the associated feature/code.

Contributing / Pull Requests

Refer to the Contributor Guide for setting up and building Autofac source.

You can also open this repository right now in VS Code.

Showing the top 20 packages that depend on Autofac.

Packages Downloads
Autofac.Extras.Quartz
Autofac integration for Quartz.Net.
65
Aspose.Words
Aspose.Words for .NET is a cross-platform document processing library that allows developers to work with a variety of Microsoft Word, OpenOffice, Web, PDF, and image file formats. .NET developers can easily create, open, read, render, edit, convert, merge, split, compare documents. Almost all mainstream document formats are supported, including DOCX, DOC, RTF, ODT, PDF, Markdown, HTML, XML, XAML, MOBI, PNG, JPG. We also provide powerful features to generate reports from document templates and data sources.
61
Autofac.Extras.Quartz
Autofac integration for Quartz.Net
60
Autofac.Extras.Quartz
Autofac integration for Quartz.Net.
59
Aspose.Words
Aspose.Words for .NET is a powerful, high-performance document processing library for creating, editing, converting, and rendering Word and PDF files in C#. It supports DOCX, DOC, RTF, ODT, HTML, PDF, Markdown, and over 30 formats. Designed for .NET developers, it enables advanced document automation, mail merge, text extraction, and report generation. Aspose.Words ensures high fidelity in document conversion, seamless API integration, and cross-platform compatibility. Ideal for cloud, web, and desktop applications.
57
ECommon.Autofac
Autofac extension for ECommon.
57
Autofac.Extras.Quartz
Autofac integration for Quartz.Net
56
Autofac.Extras.Quartz
Autofac integration for Quartz.Net
54
Autofac.Extras.Quartz
Autofac integration for Quartz.Net.
54
Autofac.Extras.Quartz
Autofac integration for Quartz.Net.
53
Autofac.Extensions.DependencyInjection
Autofac implementation of the interfaces in Microsoft.Extensions.DependencyInjection.Abstractions, the .NET Framework dependency injection abstraction.
53
Autofac.Extras.Quartz
Autofac integration for Quartz.Net.
52
Autofac.Extras.Quartz
Autofac integration for Quartz.Net.
51
Aspose.Words
Aspose.Words for .NET is a cross-platform document processing library that allows developers to work with a variety of Microsoft Word, OpenOffice, Web, PDF, and image file formats. .NET developers can easily create, open, read, render, edit, convert, merge, split, compare documents. Almost all mainstream document formats are supported, including DOCX, DOC, RTF, ODT, PDF, Markdown, HTML, XML, XAML, MOBI, PNG, JPG. We also provide powerful features to generate reports from document templates and data sources.
51

.NET 10.0

  • No dependencies.

.NET 8.0

.NET Standard 2.0

.NET Standard 2.1

Version Downloads Last updated
9.3.4 21 09/18/2026
9.3.3 24 09/18/2026
9.3.2 27 08/02/2026
9.3.1 21 07/14/2026
9.3.0 27 06/20/2026
9.2.0 23 06/18/2026
9.1.0 53 03/13/2026
9.0.0 66 12/19/2025
8.4.0 4 09/28/2026
8.3.0 56 12/13/2025
8.2.1 4 10/13/2026
8.2.0 11 10/13/2026
8.1.1 52 12/16/2025
8.1.0 12 10/12/2026
8.0.0 8 10/04/2026
7.1.0 7 10/03/2026
7.0.1 43 12/12/2025
7.0.0 3 10/15/2026
6.5.0 53 12/14/2025
6.4.0 48 12/13/2025
6.3.0 3 10/14/2026
6.2.0 5 09/29/2026
6.1.0 31 12/12/2025
6.0.0 48 12/14/2025
5.2.0 46 12/26/2025
5.1.4 44 12/22/2025
5.1.3 47 12/12/2025
5.1.2 55 12/12/2025
5.1.1 52 12/13/2025
5.1.0 42 01/09/2026
5.0.0 35 12/11/2025
4.9.4 40 12/20/2025
4.9.3 39 01/09/2026
4.9.2 33 01/01/2026
4.9.1 11 10/15/2026
4.9.0 48 12/13/2025
4.9.0-beta1 38 12/21/2025
4.8.1 3 10/14/2026
4.8.0 31 12/21/2025
4.7.1 38 01/08/2026
4.7.0 44 12/13/2025
4.6.2 4 10/07/2026
4.6.1 47 01/01/2026
4.6.0 48 12/14/2025
4.5.0 40 12/14/2025
4.4.0 47 12/13/2025
4.3.0 6 10/12/2026
4.2.1 32 12/14/2025
4.2.0 38 12/12/2025
4.1.1 44 01/01/2026
4.1.0 11 10/04/2026
4.0.1 38 12/27/2025
4.0.0 32 12/21/2025
4.0.0-rc3-316 38 01/09/2026
4.0.0-rc3-309 40 12/13/2025
4.0.0-rc3-293 36 01/01/2026
4.0.0-rc3-286 40 12/17/2025
4.0.0-rc3-280 35 12/17/2025
4.0.0-rc2-240 11 10/10/2026
4.0.0-rc1-177 61 12/12/2025
4.0.0-beta8-157 38 01/09/2026
4.0.0-beta7-130 36 12/30/2025
4.0.0-beta6-110 4 10/21/2026
4.0.0-beta5-90 33 12/20/2025
4.0.0-alpha2 34 01/09/2026
4.0.0-alpha1 37 12/20/2025
3.5.2 50 01/01/2026
3.5.0 2 10/12/2026
3.4.1 35 12/13/2025
3.4.0 41 12/15/2025
3.3.1 40 12/13/2025
3.3.0 6 10/13/2026
3.2.0 28 12/12/2025
3.1.5 4 10/12/2026
3.1.4 43 12/14/2025
3.1.3 35 12/10/2025
3.1.1 36 12/14/2025
3.1.0 40 12/14/2025
3.0.2 47 12/13/2025
3.0.1 34 01/01/2026
3.0.0 38 01/09/2026
3.0.0-beta2 3 10/24/2026
3.0.0-beta 37 12/13/2025
2.6.3.862 50 12/22/2025
2.6.2.859 31 01/08/2026
2.6.1.841 36 12/23/2025
2.5.2.830 2 10/02/2026
2.5.1.827 49 12/14/2025
2.4.5.724 8 09/28/2026
2.4.4.705 36 01/01/2026
2.4.3.700 37 12/13/2025
2.4.2.696 4 10/04/2026
2.3.2.632 4 10/05/2026
2.2.4.900 5 10/08/2026