diff --git a/src/Umbraco.Core/Composing/ContainerFactory.cs b/src/Umbraco.Core/Composing/ContainerFactory.cs index 70e04eb2ed..5c85072298 100644 --- a/src/Umbraco.Core/Composing/ContainerFactory.cs +++ b/src/Umbraco.Core/Composing/ContainerFactory.cs @@ -31,6 +31,7 @@ namespace Umbraco.Core.Composing { throw new Exception($"Container factory '${configuredTypeName}' did not return an IContainer implementation."); } + return container; } } diff --git a/src/Umbraco.Core/UmbracoApplicationBase.cs b/src/Umbraco.Core/UmbracoApplicationBase.cs index 2e08814e1f..12bb63f83b 100644 --- a/src/Umbraco.Core/UmbracoApplicationBase.cs +++ b/src/Umbraco.Core/UmbracoApplicationBase.cs @@ -70,6 +70,7 @@ namespace Umbraco.Core // create the container for the application, and configure. // the boot manager is responsible for registrations var container = GetContainer(); + container.RegisterSingleton(x => container); Current.Container = container; // register the essential stuff,