We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa551b1 commit 9f6a71aCopy full SHA for 9f6a71a
src/SimpleInjector.Integration.ServiceCollection/SimpleInjectorServiceCollectionExtensions.cs
@@ -75,10 +75,12 @@ public static IServiceCollection AddSimpleInjector(
75
76
HookAspNetCoreHostHostedServiceServiceProviderInitialization(options);
77
78
- setupAction?.Invoke(options);
79
-
+ // We must register the service scope before calling the setupAction. This allows setup code to replace
+ // it. See: #17.
80
RegisterServiceScope(options);
81
82
+ setupAction?.Invoke(options);
83
+
84
if (options.AutoCrossWireFrameworkComponents)
85
{
86
AddAutoCrossWiring(options);
0 commit comments