Welcome to Autofac’s documentation!¶

Autofac is an addictive IoC container for Microsoft .NET 4.5, Silverlight 5, Windows Store apps, and Windows Phone 8 apps. 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.
- Getting Started
- What’s New / Release Notes
- Registering Components
- Resolving Services
- Controlling Scope and Lifetime
- Configuration
- Application Integration
- Best Practices and Recommendations
- Always Resolve Dependencies from Nested Lifetimes
- Structure Configuration with Modules
- Use As<T>() in Delegate Registrations
- Use Constructor Injection
- Use Relationship Types, Not Service Locators
- Register Components from Least-to-Most Specific
- Use Profilers for Performance Checking
- Register Once, Resolve Many
- Register Frequently-Used Components with Lambdas
- Consider a Container as Immutable
- Advanced Topics
- Examples
- Frequently Asked Questions
- How do I work with per-request lifetime scope?
- How do I pick a service implementation by context?
- How do I create a session-based lifetime scope in a web application?
- Why aren’t my assemblies getting scanned after IIS restart?
- How do I conditionally register components?
- How do I share component registrations across application types?
- How do I keep Autofac references isolated away from my app?
- Why are “old versions” of the framework (e.g., System.Core 2.0.5.0) referenced?
- Why don’t all Autofac packages target the latest Autofac core?
- How do I inject configuration, environment, or context parameters?
- How do I pass a parameter to a component in the middle of a resolve chain?
- Glossary
- Contributor Guide
- Getting Support
- API Documentation