Skip to content

Conversation

@dependabot
Copy link

@dependabot dependabot bot commented on behalf of github Oct 2, 2025

Updated Autofac from 6.4.0 to 8.1.0.

Release notes

Sourced from Autofac's releases.

8.1.0

What's Changed

  • Optimized required member caching (#​1415 - thanks @​SergeiPavlov!)
  • Correctly handle polyfilled required infrastructure attributes by (#​1421 - thanks @​DoctorVanGogh!)
  • Improve memory management in registered services tracking (#​1423 - thanks @​snaumenko-st!)
  • Fix #​1330: Generic decorators attached to generics that expose multiple service types should be handled properly (#​1424)

Full Changelog: autofac/Autofac@v8.0.0...v8.1.0

8.0.0

Breaking Changes

  • Removed netcoreapp3.1 support/testing (#​1401).
  • Converted ResolveRequest into a readonly struct (#​1397 - thanks @​SergeiPavlov!).

Additional Changes

  • Added net8.0 target (#​1401).
  • Replaced use of Moq in tests with NSubstitute (#​1390 - thanks @​aydjay!).

Full Changelog: autofac/Autofac@v7.1.0...v8.0.0

7.1.0

What's Changed

  • Fix #​1388: Re-enabled RegsiterTypes filtering. This was an accidental behavior regression where the RegisterTypes method wouldn't filter out non-registerable types.
  • RegisterType<T> and RegisterType(Type t) will now throw when non-registerable types are provided, for example containerBuilder.RegisterType<IInterface>() (you can't register interfaces - you can register things As<IInterface>). This used to throw at container build time; now it throws at RegisterType time and it has a more precise error message so you can handle these issues more proactively.

Full Changelog: autofac/Autofac@v7.0.1...v7.1.0

7.0.1

What's Changed

  • Reduced lock contention in LifetimeScope.CreateSharedInstance (thanks @​botinko)
  • Optimized Autofac.Features.OpenGenerics.OpenGenericServiceBinder.TryBindOpenGenericTypedService (thanks @​SergeiPavlov)

Full Changelog: autofac/Autofac@v7.0.0...v7.0.1

7.0.0

Version 7.0.0 is a major increment due to some changes in the target frameworks and some behavioral changes. We summarize these in the documentation, but included here as well:

New Features

  • Properties marked required will now be injected by default. As part of this, the default property injector using PropertiesAutowired() will not inject properties marked required. The documentation has more explanation with examples.
  • Ability to isolate AssemblyLoadContext by lifetime scope. A new method, BeginLoadContextLifetimeScope, has been added that allows you to create a lifetime scope tied to a specific AssemblyLoadContext. When the scope is disposed, Autofac will perform a best-effort release of all references to types from that context so the assemblies can be unloaded. The documentation explains this in greater detail.
  • Documentation links in exception messages. Common Autofac exceptions now include links to our online documentation to help you understand what the exceptions mean and how to troubleshoot them.

Issues and PRs

Full Changelog: autofac/Autofac@v6.5.0...v7.0.0

Breaking Changes

  • net50 no longer targeted. Autofac will still work with .NET 5 via the netstandard2.1 target, but we recommend you upgrade to a later, supported version of .NET.
  • Properties marked required will now be injected by default. As noted above, required properties will be injected. This is a behavioral change from Autofac 6.0.
  • Default property injection ignores required properties. Using PropertiesAutowired() will ignore required properties because it's assumed they must be set during construction rather than post-object-creation.
  • RegisterGeneratedFactory is obsolete. This feature has been replaced by the Func<X, Y, B> built-in relationship and delegate factories.
  • ILifetimeScope has a new BeginLoadContextLifetimeScope method. If you have mocks of ILifetimeScope this method must now be implemented.

6.5.0

  • Reflection caches have moved to a central location Autofac.Core.ReflectionCacheSet (#​1341). This is part of an effort to support unloading AssemblyLoadContexts associated with child scopes and enable better plugin support (#​1324).
  • IDecoratorContext now extends IComponentContext so decorator decisions can be made based on the constructed container (#​1338, #​1352).
  • Fix memory leak regression (#​1353 - Thanks @​botinko!)

Full Changelog: autofac/Autofac@v6.4.0...v6.5.0

Commits viewable in compare view.

Updated Autofac.Extensions.DependencyInjection from 8.0.0 to 10.0.0.

Release notes

Sourced from Autofac.Extensions.DependencyInjection's releases.

10.0.0

Breaking Changes

All instance dependencies are now considered ExternallyOwned which means if you register an object instance in the dependency injection container through this package, when you dispose of the container it will not dispose of the provided instance. This is different than default Autofac behavior. Autofac normally assumes control of registered instances, where the Microsoft DI container does not. This change only affects instances registered using the Microsoft syntax and then populated into Autofac; it does not change the underlying Autofac container.

public class Startup
{
  public void ConfigureServices(IServiceCollection services)
  {
      // The instance `item` here WILL NOT be disposed when the container is disposed
      // because it's registered using Microsoft syntax and will be imported into Autofac.
      var item = new MyDisposableItem();
      services.AddSingleton(item);
  }

  public void ConfigureContainer(ContainerBuilder builder)
  {
      // The instance `item` here WILL be disposed when the container is disposed
      // because it's registered using Autofac syntax directly with Autofac.
      var item = new MyDisposableItem();
      builder.RegisterInstance(item);
  }
}

Additional Changes

  • Optimization for reflection-activated components to avoid adding a parameter in the resolve path if possible. (@​alistairjevans #​119)
  • Updated Autofac dependency to 8.1.0.

Full Changelog: autofac/Autofac.Extensions.DependencyInjection@v9.0.0...v10.0.0

9.0.0

Breaking Changes

Additional Changes

  • Added keyed service support (IKeyedServiceProvider, IServiceProviderIsKeyedService, support for AnyKey) to match Microsoft.Extensions.DependencyInjection feature updates for .NET 8. (#​115)

Full Changelog: autofac/Autofac.Extensions.DependencyInjection@v8.0.0...v9.0.0

Commits viewable in compare view.

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Bumps Autofac from 6.4.0 to 8.1.0
Bumps Autofac.Extensions.DependencyInjection from 8.0.0 to 10.0.0

---
updated-dependencies:
- dependency-name: Autofac
  dependency-version: 8.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Autofac.Extensions.DependencyInjection
  dependency-version: 10.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant