diff --git a/test/Microsoft.AspNetCore.Mvc.Test/MvcServiceCollectionExtensionsTest.cs b/test/Microsoft.AspNetCore.Mvc.Test/MvcServiceCollectionExtensionsTest.cs index 3174f5d8d9..dfa00e1454 100644 --- a/test/Microsoft.AspNetCore.Mvc.Test/MvcServiceCollectionExtensionsTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Test/MvcServiceCollectionExtensionsTest.cs @@ -31,6 +31,7 @@ using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Mvc.ViewFeatures.Internal; using Microsoft.AspNetCore.Routing; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.ObjectPool; @@ -261,6 +262,7 @@ public void AddMvc_NoScopedServiceIsReferredToByASingleton() services.AddSingleton(GetHostingEnvironment()); services.AddSingleton(); services.AddSingleton(new DiagnosticListener("Microsoft.AspNet")); + services.AddSingleton(new ConfigurationBuilder().Build()); services.AddLogging(); services.AddOptions(); services.AddMvc();