diff --git a/src/OrchardCore/OrchardCore.Infrastructure/Shell/ShellOrchardCoreBuilderExtensions.cs b/src/OrchardCore/OrchardCore.Infrastructure/Shell/ShellOrchardCoreBuilderExtensions.cs index 2e96791974f..e6edd4ab963 100644 --- a/src/OrchardCore/OrchardCore.Infrastructure/Shell/ShellOrchardCoreBuilderExtensions.cs +++ b/src/OrchardCore/OrchardCore.Infrastructure/Shell/ShellOrchardCoreBuilderExtensions.cs @@ -18,8 +18,6 @@ public static OrchardCoreBuilder AddDataStorage(this OrchardCoreBuilder builder) .ConfigureServices(services => { services.AddScoped(); - services.AddScoped(); - services.AddScoped(); }); return builder; diff --git a/src/OrchardCore/OrchardCore/Modules/Extensions/ServiceCollectionExtensions.cs b/src/OrchardCore/OrchardCore/Modules/Extensions/ServiceCollectionExtensions.cs index b06f4f2d73e..fe88d1d8f0b 100644 --- a/src/OrchardCore/OrchardCore/Modules/Extensions/ServiceCollectionExtensions.cs +++ b/src/OrchardCore/OrchardCore/Modules/Extensions/ServiceCollectionExtensions.cs @@ -168,6 +168,8 @@ private static void AddExtensionServices(OrchardCoreBuilder builder) builder.ConfigureServices(services => { services.AddExtensionManager(); + services.AddScoped(); + services.AddScoped(); }); }