Autofac 2.5 is now available on the project site and via NuGet. The new version includes a range of great contributions.
After incubation as an external project, Windows Phone 7 now joins ranks of officially-supported targets (just install the Autofac package via NuGet and you’re up and running!) For some tips on getting started see Brendan Kowitz’s notes.
The new release is highly-compatible with Autofac 2.4 (best used with the VS2010 compiler when targeting .NET 3.5.)
Included changes are:
- Issue 329 – types are filtered by compatibilty before invoking key mapping functions when scanning assemblies
RegisterAssemblyTypes(...).WithMetadataFrom<T>()simplifies extraction of metadata from attribute propertiesModule.ThisAssemblysimplifies implementation of modules that scan their own assembly- Issue 333 – enable
RegisterAssemblyTypes(...).PreserveExistingDefaults() - Windows Phone 7 and 7.1 support
- Issue 312 – allow
ContainerBuilder.Update()on theComponentRegistryof any
ILifetimeScopewithout affecting the parent scope - Issue 327 – allow autowiring of enum properties
- Issue 319 – support list and dictionary literals in XML configuration
- Issue 330 – corrections to generic type constraint checking where the constraint type is an interface
- Issue 331 – fix build warnings and runtime issues using Moq integration
- Introduced
ContainerBuildOptionsto control invocation ofIStartable.Start()under unit tests Container.Emptyis now a property rather than a field (protection from inadvertent updates- Removed broken/obsolete examples from source tree (better examples are available elsewhere online)
- Host configuration features for
AutofacHostFactoryin WCF integration ComponentRegistry.Register()is now safe for use under multiple threads- Issue 227 – breaking change additional options (and enum rather than boolean parameter) for
PropertiesAutowired() - Additional web abstractions are now registered by the MVC3
AutofacWebTypesModule - Issue 311 – fixed potential lifetime issues when injecting into MVC filter attributes
- Tightened up behavior when correct constructor to use under reflection activator is ambiguous (now throws rather than choosing nondeterministically)
- Issue 309 – fixed some issues in
TypeExtensions.IsClosedTypeOf() - Improved exception messages
Many thanks to the Autofac project team and collaborators across the web for making this release happen!
[...] Autofac 2.5 Released (Nicholas Blumhardt) [...]
congratulations
[...] Autofac 2.5 Released – Nicholas Blumhardt announces the release of AutoFac 2.5. This release brings support for Windows Phone 7 to the main project, fixes a number of reported issues, whilst maintaining compatibility with code written against version 2.4 [...]
Thank you guys for giving us this wonderful project! Autofac was my first experience with IoC/DI and though the concepts were foreign to me, Autofac felt really natural to program with, and that’s the best thing for an API.
This release also includes a contrib project that allows you to use Autofac as your backing store for resolving Enterprise Library dependencies.
Sweet! Congratulations
D’oh! Big omission on my part, thanks for the note Travis.