Repository navigation
Bump Autofac from 6.5.0 to 9.3.4 - #387
Merged
Merged
Conversation
--- updated-dependencies: - dependency-name: Autofac dependency-version: 9.3.4 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Owner
|
Reviewed the full one-package diff, Autofac 7/8/9 breaking-change notes, and Program.ConfigureContainer. This dependency is confined to the net10.0 CLI. Current use is assembly/type registration and constructor resolution; the changed required-property injection, ResolveRequest, and legacy-target APIs are not used. Autofac 9 explicitly supports net10.0. Updated against current main; all required cross-platform builds/unit tests, signed package consumption and CLI launch smoke checks, Pebble integration, and both CodeQL jobs passed on 261e7ad. AI-assisted review: OpenCode using gpt-6-astra. Dependency/source compatibility review with hosted verification; no local test reruns or human review claimed. |
dependabot
Bot
deleted the
dependabot/nuget/src/Certes.Cli/Autofac-9.3.4
branch
September 28, 2026 01:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated Autofac from 6.5.0 to 9.3.4.
Release notes
Sourced from Autofac's releases.
9.3.4
What's Changed
Do not build a held registration's pipeline early by @tillig in autofac/Autofac#1504 (fixes #1503) - a regression introduced in 9.3.3. Registering an open generic for several services (
.As(typeof(IFirstService<>)).As(typeof(ISecondService<>))) threwInvalidOperationException: Component pipeline has already been built, and cannot be modified.on first resolve whenever anything attached toPipelineBuildingfrom the component registry'sRegisteredevent.Autofac.Extensions.DependencyInjectionattaches exactly that way on every registration, so ASP.NET Core applications using a multi-service open generic registration hit it deterministically. The fix restores the ordering 9.3.2 had, where the pipeline is built only afterRegisteredhas been raised.If you are on 9.3.3 and register an open generic against more than one service, upgrade. Thanks to @hjalle for the report and for pinning it to the exact line.
Full Changelog: autofac/Autofac@v9.3.3...v9.3.4
9.3.3
What's Changed
KeyedService.AnyKeyfallback adapter was cached and handed to every registry that asked for it, so the first scope to receive it built and disposed its pipeline out from under the rest. Other scopes then failed to add middleware, resolved through a disposed activator, or adapted another scope's registration. Multitenant containers hit this most often.System.Diagnostics.DiagnosticSourceandMicrosoft.Bcl.AsyncInterfaces(netstandard2.0 only) move to 10.0.12.Full Changelog: autofac/Autofac@v9.3.2...v9.3.3
9.3.2
What's Changed
[ServiceKey]attribute by @npease18 (#1495, fixes #1480)New Contributors
Full Changelog: autofac/Autofac@v9.3.1...v9.3.2
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
IStartablethrows during Build (#1392) by @tillig in Dispose container when an IStartable throws during Build (#1392) autofac/Autofac#1485ExternallyOwnedownership for decorators (#1402) by @tillig in Honor ExternallyOwned ownership for decorators (#1402) autofac/Autofac#1486Moduleregistry events when hooks are overridden (#1446) by @tillig in Only subscribe Module registry events when hooks are overridden (#1446) autofac/Autofac#1487GetRegistrationIdextension to expose a registration's unique ID (#1327) by @tillig in Add GetRegistrationId extension to expose a registration's unique ID (#1327) autofac/Autofac#1490Full 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 wayAnyKeyworks 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:Inject Service Key Into Constructors
The new
[ServiceKey]attribute allows you to inject the service key provided during resolution. This is handy in conjunction withAnyKey. 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.
Then when you resolve the class, the service key will automatically be injected.
You can also make use of this in a lambda registration.
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_METRICSenvironment variable in your process totrueor1to enable this feature. You can see the set of counters that will become available here.... (truncated)
9.0.0
Updated Autofac for .NET 10. New current set of target frameworks:
net10.0;net8.0;netstandard2.1;netstandard2.0Breaking Changes
Dropped support for
net6.0,net7.0.Additional Changes
net10.0.Full Changelog: autofac/Autofac@v8.4.0...v9.0.0
8.4.0
Minor breaking change: The shim
RequiresUnreferencedCodeAttributehas been changed frompublictointernal(#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
IIndex<K,V>.TryGetValue()since it may return null on failure.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
AssemblyLoadContextdisposal (#1438 - thanks @hemirunner426!)RegisterServiceMiddlewareto assist with interceptors/decorators (#1439 - thanks @idiotsky!)Full Changelog: autofac/Autofac@v8.1.1...v8.2.0
8.1.1
What's Changed
ResolveRequest.operator==()(#1430, thanks @SergeiPavlov!)WithPropertyregistration methods consistently allow null values (#1428)Full Changelog: autofac/Autofac@v8.1.0...v8.1.1
8.1.0
What's Changed
requiredmember caching (#1415 - thanks @SergeiPavlov!)requiredinfrastructure attributes by (#1421 - thanks @DoctorVanGogh!)Full Changelog: autofac/Autofac@v8.0.0...v8.1.0
8.0.0
Breaking Changes
netcoreapp3.1support/testing (#1401).ResolveRequestinto areadonly struct(#1397 - thanks @SergeiPavlov!).Additional Changes
net8.0target (#1401).Full Changelog: autofac/Autofac@v7.1.0...v8.0.0
7.1.0
What's Changed
RegsiterTypesfiltering. This was an accidental behavior regression where theRegisterTypesmethod wouldn't filter out non-registerable types.RegisterType<T>andRegisterType(Type t)will now throw when non-registerable types are provided, for examplecontainerBuilder.RegisterType<IInterface>()(you can't register interfaces - you can register thingsAs<IInterface>). This used to throw at container build time; now it throws atRegisterTypetime 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
LifetimeScope.CreateSharedInstance(thanks @botinko)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
requiredwill now be injected by default. As part of this, the default property injector usingPropertiesAutowired()will not inject properties markedrequired. The documentation has more explanation with examples.AssemblyLoadContextby lifetime scope. A new method,BeginLoadContextLifetimeScope, has been added that allows you to create a lifetime scope tied to a specificAssemblyLoadContext. 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.Issues and PRs
Full Changelog: autofac/Autofac@v6.5.0...v7.0.0
Breaking Changes
net50no longer targeted. Autofac will still work with .NET 5 via thenetstandard2.1target, but we recommend you upgrade to a later, supported version of .NET.requiredwill now be injected by default. As noted above,requiredproperties will be injected. This is a behavioral change from Autofac 6.0.requiredproperties. UsingPropertiesAutowired()will ignorerequiredproperties because it's assumed they must be set during construction rather than post-object-creation.RegisterGeneratedFactoryis obsolete. This feature has been replaced by theFunc<X, Y, B>built-in relationship and delegate factories.ILifetimeScopehas a newBeginLoadContextLifetimeScopemethod. If you have mocks ofILifetimeScopethis method must now be implemented.Commits viewable in compare view.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)