Skip to content

Bump Autofac and Autofac.Extensions.DependencyInjection - #36

Merged
dvir001 merged 1 commit into
mainfrom
dependabot/nuget/PluralKit.Core/multi-39cbad5175
Jul 10, 2026
Merged

Bump Autofac and Autofac.Extensions.DependencyInjection#36
dvir001 merged 1 commit into
mainfrom
dependabot/nuget/PluralKit.Core/multi-39cbad5175

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 10, 2026

Copy link
Copy Markdown

Updated Autofac from 8.1.1 to 9.3.1.

Release notes

Sourced from Autofac's releases.

9.3.1

What's Changed

Fix per-resolve closure allocation in resolve pipeline (#​1493) by @​tillig in autofac/Autofac#1494

Full Changelog: autofac/Autofac@v9.3.0...v9.3.1

9.3.0

What's Changed

Full Changelog: autofac/Autofac@v9.2.0...v9.3.0

9.2.0

What's Changed

Full Changelog: autofac/Autofac@v9.1.0...v9.2.0

9.1.0

This is a pretty big release for Autofac with some major new functionality!

AnyKey Support

First, Autofac now natively supports the concept of AnyKey. It behaves the same way AnyKey works in Microsoft.Extensions.DependencyInjection, but it is native to Autofac directly. The unit tests here show some very detailed examples of usage, but on a high level:

var builder = new ContainerBuilder();
builder.RegisterType<Service>().Keyed<IService>(KeyedService.AnyKey);

var container = builder.Build();

// Registering as AnyKey allows it to respond to... any key!
var service = container.ResolveKeyed<IService>("service1");

Inject Service Key Into Constructors

The new [ServiceKey] attribute allows you to inject the service key provided during resolution. This is handy in conjunction with AnyKey. Again, this is similar to the construct in Microsoft.Extensions.DependencyInjection, but with native Autofac.

First, mark up your class to take the constructor parameter.

public class Service : IService
{
  private readonly string _id;
  public Service([ServiceKey] string id) => _id = id;
}

Then when you resolve the class, the service key will automatically be injected.

You can also make use of this in a lambda registration.

var builder = new ContainerBuilder();
builder.Register<Service>((ctx, p) => {
  var key = p.TryGetKeyedServiceKey(out string value) ? value : null;
  return new Service(key);
}).Keyed<Service>(KeyedService.AnyKey);

Metrics

Some metrics have been introduced that can allow you to capture counters on how long middleware is taking, how often lock contention occurs, and so on.

Set the AUTOFAC_METRICS environment variable in your process to true or 1 to enable this feature. You can see the set of counters that will become available here.

⚠️ This is NOT FREE. Collecting counters and metrics will incur a performance hit, so it's not something you want to leave on in production.

... (truncated)

9.0.0

Updated Autofac for .NET 10. New current set of target frameworks: net10.0;net8.0;netstandard2.1;netstandard2.0

Breaking Changes

Dropped support for net6.0, net7.0.

Additional Changes

  • Added support for net10.0.
  • Updated dependencies:
    • System.Diagnostics.DiagnosticSource 8.0.1 => 10.0.0
    • Microsoft.Bcl.AsyncInterfaces 8.0.0 => 10.0.0

Full Changelog: autofac/Autofac@v8.4.0...v9.0.0

8.4.0

Minor breaking change: The shim RequiresUnreferencedCodeAttribute has been changed from public to internal (#​1462/#​1463 - thanks @​prochnowc!). This will only affect people targeting older/lower .NET standard frameworks who also rely on the shim attribute in Autofac. While it's technically breaking, it didn't seem like a great reason to do a full major release due to the edge case nature of the set of applications/users affected.

8.3.0

What's Changed

  • Corrected nullable markup on IIndex<K,V>.TryGetValue() since it may return null on failure.
  • Composite services can now be keyed (#​1458 - thanks @​syko9000!)
  • Packages for core Autofac are no longer published to MyGet. Instead, builds are now available from GitHub Packages This also means the actual packages themselves won't be manually attached to the release - you can get them from the package source now.

Full Changelog: autofac/Autofac@v8.2.1...v8.3.0

8.2.1

Fix #​1450: AutoActivate() no longer hides the default service registration. (Thanks, @​nblumhardt!)

8.2.0

What's Changed

  • Fix #​1437: Improve type cache handling for generic type arguments with respect to AssemblyLoadContext disposal (#​1438 - thanks @​hemirunner426!)
  • Added overloads for RegisterServiceMiddleware to assist with interceptors/decorators (#​1439 - thanks @​idiotsky!)

Full Changelog: autofac/Autofac@v8.1.1...v8.2.0

Commits viewable in compare view.

Updated Autofac.Extensions.DependencyInjection from 10.0.0 to 11.0.2.

Release notes

Sourced from Autofac.Extensions.DependencyInjection's releases.

11.0.2

Updated Autofac reference to 9.3.1.

11.0.1

What's Changed

  • Updated Autofac from 9.1.0 to 9.2.0.
  • Updated Microsoft.Extensions.DependencyInjection.Abstractions from 10.0.4 to 10.0.9.

11.0.0

Breaking Changes

  • Drop .NET 6 and .NET 7 targeting.
  • Add .NET 10 target.
  • Change the AnyKey support to use the new native support for AnyKey in core Autofac - this removes some of the custom internals used to support keyed services and moves that to core Autofac.

Other Changes

  • Updated benchmark suite to test more scenarios.
  • Executed some targeted performance improvements in the "glue" that maps M.E.DI behaviors to Autofac.
  • Updated Autofac dependency to v9.1.0.

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

Commits viewable in compare view.

@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Jul 10, 2026
@dependabot @github

dependabot Bot commented on behalf of github Jul 10, 2026

Copy link
Copy Markdown
Author

Labels

The following labels could not be found: dotnet. Please create it before Dependabot can add it to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

Bumps Autofac from 8.1.1 to 9.3.1
Bumps Autofac.Extensions.DependencyInjection from 10.0.0 to 11.0.2

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

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/nuget/PluralKit.Core/multi-39cbad5175 branch from 4d88f27 to 58bc7d7 Compare July 10, 2026 15:08
@dvir001
dvir001 merged commit e1c6372 into main Jul 10, 2026
0 of 5 checks passed
@dependabot
dependabot Bot deleted the dependabot/nuget/PluralKit.Core/multi-39cbad5175 branch July 10, 2026 15:14
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant