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() simplifies extraction of metadata from attribute properties

  • Module.ThisAssembly simplifies 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 the ComponentRegistry of any ILifetimeScope without 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 ContainerBuildOptions to control invocation of IStartable.Start() under unit tests

  • Container.Empty is 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 AutofacHostFactory in 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!