From c885f850e9dcb09da349252d71f68e191eef6155 Mon Sep 17 00:00:00 2001 From: Lars-Erik Aabech Date: Sat, 28 Jul 2018 01:05:07 +0200 Subject: [PATCH] Container should be registered with itself --- src/Umbraco.Core/Composing/ContainerFactory.cs | 1 + src/Umbraco.Core/UmbracoApplicationBase.cs | 1 + 2 files changed, 2 insertions(+) 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,