-
Notifications
You must be signed in to change notification settings - Fork 0
Release Notes
A list of changes and bug fixes included in recent versions of core Autofac.
#4.1.1
- Fixed #728:
AnyConcreteTypeNotAlreadyRegisteredSourcenow ignores string parameters. - Fixed #790:
ContravariantRegistrationSourcenow correctly ignores value types. - Fixed #794: Incorrect handling of generic parameter constraints.
- Fixed #799: Inject unset properties now handles exceptions thrown during property get operations.
#4.1.0
- Fixed #789: Property injection was incorrectly considering parameters during resolution.
InjectPropertiesnow allows parameters to be passed if that functionality is required.
#4.0.1
- Updated minimum specific .NET framework target to be .NET 4.5.
- Removed specific
uap10.0framework target since it's covered bynetstandard1.1.
#4.0.0
-
New target platform set
netstandard1.1. This includes support for .NET Core and UWP (Universal Windows Platform). You can read more about the newnetstandardtarget framework monikers and the associated compatibility on the .NET Core documentation. -
Implementation of the
Microsoft.Extensions.DependencyInjectionabstraction. This can be found in theAutofac.Extensions.DependencyInjectionNuGet package. -
The
PreserveExistingDefaultsoption now works correctly across lifetime scopes when registrations are added during the creation of a child lifetime scope. -
The ability to provide an
IPropertySelectorto choose which properties should be property injected. -
More type and component registration descriptions to exception messages for easier debugging.
-
AsImplementedInterfacesnow includes the actual interface being registered preventing the need to callAsSelfas well. -
Performance improvements in a number of core components.
-
A backwards-compatibility polyfill for the
Serializableattribute so that .NET 4.5.1 consumers can serializeDependencyResolutionExceptionacrossAppDomainetc. as was possible prior to migrating to PCL. -
Details are provided on the specific registration that fails when a tagged lifetime scope can't be found.
-
A
DependencyResolutionExceptionis thrown if anInstancePerLifetimeScopeservice attempts to create an instance of itself during its construction. -
Added assembly scanning overloads of
AsClosedTypesOfthat accepts aserviceKeyorserviceKeyMappingfor keyed registrations.
#3.5.0
- Resolved issue 512: Added Windows Phone 8.1 (
wpa81) target to NuGet package and switched to build under Profile328 (portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1)
- Resolved issue issue 466: Pushed the notion of per-request lifetime scope into Autofac core. Individual web/OWIN request mechanisms have been marked obsolete in favor of the new central method.
- Resolved issue issue 269: Func<T,U,...> should not be resolvable if any parameter types are duplicated.
- Resolved issue issue 462: Switched
ContainerBuilder.Updateoptional parameter to two separate method overloads.
- Resolved Issue issue 474: Added a new
IModuleRegistrarinterface so module registrations can be chained off of aContainerBuilderin a fluent fashion.
- Resolved issue 464:
InjectPropertiesnow ignores properties that contain a collection of value types (includesIList,ICollectionandIReadOnlyCollection).
- Resolved issue issue 454: Added support for
AutoActivate/IStartableonUpdate.
- Added support for
IList,ICollection,IReadOnlyListandIReadOnlyCollectionto theCollectionRegistrationSource.
- Issue 450: DynamicProxy2 integration is broken after upgrade to Autofac 3.1.
-
The package name and version is written into the
AssemblyDescriptionattibute. This allows the package information to be seen in Visual Studio avoiding confusion with the assembly version that remains at the major. -
Added ability to configure
AnyConcreteTypeNotAlreadyRegisteredSourceregistrations.builder.RegisterSource(new AnyConcreteTypeNotAlreadyRegisteredSource() .WithRegistrationsAs(rb => rb.InstancePerLifetimeScope()));
-
Moved
Autofac.Configurationto a separate NuGet package. -
Added non-generic overload for
ResolveKeyed.
-
Issue 413: Resolving a
SingleInstanceregistration locks during subsequent resolves, even if the instance has already been created.
- Enabled XML documentation for all projects and added missing comments.
- Minor performance improvements in reflection based activation.
- Resolved issue 414: Made sure the result from
MetadataViewProvideris captured in the closure created for the delegate registration instead of being created on each invocation. - Resolved Issue 421: Generic parameters constrained with complex generic types fail to resolve.
- Rollback of Issue 397 (Nested lifetime scopes aren't disposed when the parent is disposed) due to memory leak.
- Added SignalR Integration.
- Updated Newtonsoft.Json package to the latest.
- Added the inner exception message to
DependencyResolutionExceptionmessage for easier troubleshooting.
-
Issue 310: Resolve fails on MEF export of type
object - Issue 352: Security exception in Silverlight 5
-
Issue 394:
ContainerBuilder.RegisterAssemblyTypedepends on assembly list order - Issue 326: If MEF contract type has generics the MEF integration fails
- Issue 343: Include inner exception message in outer exception message when wrapping exceptions from constructors
- Added
AutoActivate()registration extension to flag components to be automatically resolved on container build. - Added an
InterceptTransparentProxyregistration extension that allows transparent proxy instances to be intercepted usingProxyGenerator.CreateInterfaceProxyWithTargetInterface. - Added
AutofacInstanceContext.Currentstatic method akin to the MVCAutofacDependencyResolver.Current. MadeOperationLifetimepublicly gettable to allow forAutofacInstanceContext.Current.OperationLifetimeaccess. - Added a
RegisterTypesextension equivalent toRegisterAssemblyTypesbut which allows you to pass in a specific list of types rather than simply scanning assemblies. - Removed the now confusing (Beta) suffix from the MVC 4 and Web API integration NuGet package titles.
- The same registration can now be used to register a MVC and Web API filter. Multiple filter types on a single registration are also supported.
- Updated all dependencies to the latest versions.
- Switched Autofac.Extras.CommonServiceLocator to a portable class library.
-
Issue 303:
AutofacDomainServiceFactorycreates instances in the root container. -
Issue 305: Add
RegisterAssemblyTypesoverload which gets a list of types. -
Issue 365: Configured Nested Containers Lose
LimitTypeon Component Registrations - Affects WCF Service Resolution. -
Issue 391: Cannot use
ActionFilterForfor both MVC and Web API controllers on the same registration. -
Issue 396:
ExtensibleActionInvokerincorrectly holds attachment to expired lifetime scope in MVC4. -
Issue 339: Improve the way Autofac.Integration.Wcf exposes the
LifetimeScope. -
Issue 351:
Autofac.Integration.Mvcfails when Glimpse.Mvc3 is installed. - Issue 355: AutofacContrib.DynamicProxy2: Internal interfaces are not intercepted (and no exception).
- Issue 361: DynamicProxy interception does not work for WCF clients.
- Issue 397: Nested lifetime scopes aren't disposed when the parent is disposed.
-
Issue 388: Wrapper around
IStartableto make a component implicitly activated.
- Portable Class Library. You will be able to target the following frameworks with Autofac 3.0:
- .NET Framework 4 and higher
- Silverlight 5
- .NET for Windows Store apps
- Windows Phone 8
- Single Solution (Core and Extras)
- Semantic Versioning
- SymbolSource support
- Class based metadata
- Improved XML Configuration
- Matching multiple lifetime scopes
- ASP.NET MVC 4 support
- ASP.NET Web API support
-
Issue 389: Exception thrown in
AutofacFilterProviderwhen other filter instances registered in the container - Issue 379: There is an errror when using Autofac.Integration.Mvc, Autofac.Integration.WebApi and Autofac.Integration.Web together
- Issue 376: Exception while trying to throw an exception in Metro app
-
Issue 368: MVC
ExtensibleActionInvoker.GetParameterValueCan't Be Disabled - Issue 386: Support configuration reading from XML file that is not app.config
-
Issue 271: Could not register more then one
Modulewith the same type but with different parameters in XmlConfiguration -
Issue 378: Make
Container.Emptyimmutable - Issue 358: Portable build warnings in a Metro style app
- Issue 352: Provide Silverlight 5 Support
- Issue 287: Guidance for building AutofacContrib packages and moving to nuget
- Issue 252: Single solution for Autofac + AutofacContrib
- ASP.NET MVC 4 Integration (pre-release NuGet package).
- ASP.NET Web API Integration (pre-release NuGet package).
-
Issue 373: The
ConstructorParameterBindingnow uses aConcurrentDictionaryfor cachingConstructorInvokerinstances to support multiple containers being present in the sameAppDomain.
- Module Scanning feature.
- Performance Improvements.
- ASP.NET MVC 4 RC Integration.
- ASP.NET Web API RC Integration.
- The ASP.NET MVC integration package gets a bug fix for recursive views,
UrlHelperandRequestContextregistered byAutofacWebTypesModule, and an explicit method for registering model binders. - The WCF integration package gets much improved support for services with
InstanceContextMode.Single. - A new helper
InstancePerOwned<T>()makes it easier to control lifetime when usingOwned<T>. - Autofac can now be used with .NET Portable Class Libraries (download only on the project site. (The Windows Phone 7 build now uses this configuration too.)
- Autofac.dll is now clear of any issues found by SecAnnotate.exe.
-
RegisterAssemblyTypes(...).WithMetadataFrom<T>()simplifies extraction of metadata from attribute properties. -
Module.ThisAssemblysimplifies implementation of modules that scan their own assembly. - Windows Phone 7 and 7.1 support.
-
ILifetimeScopewithout affecting the parent scope. - 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 - Additional web abstractions are now registered by the MVC3
AutofacWebTypesModule. - Tightened up behavior when correct constructor to use under reflection activator is ambiguous (now throws rather than choosing nondeterministically).
- Improved exception messages.
- Issue 329: types are filtered by compatibilty before invoking key mapping functions when scanning assemblies.
-
Issue 333: enable
RegisterAssemblyTypes(...).PreserveExistingDefaults(). -
Issue 312: allow
ContainerBuilder.Update()on theComponentRegistryof any. - 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.
-
Issue 227: breaking change additional options (and enum rather than boolean parameter) for
PropertiesAutowired(). - Issue 311: fixed potential lifetime issues when injecting into MVC filter attributes.
-
Issue 309: fixed some issues in
TypeExtensions.IsClosedTypeOf().
- Several bug fixes and improved exception messages.
- The Multi-tenant contrib package work better with the new ASP.NET MVC3 integration.
- The awkward but very useful
IContainerAwareComponentintroduced in 2.4 has been deprecated and morphed into a much friendlier and more useful Startable implementation. - Autofac now consistently throws
DependencyResolutionException(or a subclass) whenever fatal errors occur during composition.
- ASP.NET MVC Integration no longer requires special interfaces on
HttpApplication, Web.config file edits, static properties in the application class and multiple different extension points to configure. - Complete NuGet Packages for Autofac and its sub-features.
- NuGet packages for MEF and WCF integration are now in their own packages Autofac.Mef and Autofac.Wcf respectively.
- Improved Decorator Support.
- Removed Older Silverlight Versions from Supported Builds.
- Events and Interfaces to Support Tracing.
-
.AsImplementedInterfaces()is now supported on non-scanning registrations. -
IDisposableis no longer considered a service by.AsImplementedInterfaces(). - Additional eager checks for generic type/service compatibility at registration time.
- An additional
.WithParameter()overload has been added, accepting predicate and value accessor likeResolvedParameter. - Extension methods for common predicates on
System.Typeare now public for use with scanning, e.g.Except(t => t.IsClosedTypeOf(x)). - MVC
ExtensibleActionInvokerdoes not inject action method parameters by default. -
ILifetimeScoperather thanIContaineris now accepted byServiceHostBase(WCF integration). -
AutofacInstanceContexthas been made public so that current scope can be retrieved when needed (WCF integration). - Dependencies upgraded e.g. Castle Core and NHibernate.
- Bug fixes and enhancements in AutofacContrib.Multitenant and AutofacContrib.Attributed.
- Fixed bug issue 288 – resolve all failing in customised lifetime scopes when one component supports multiple interfaces.