Fixed service provider building

This commit is contained in:
David Fowler 2014-03-15 14:41:41 -07:00
parent 4d511b3aef
commit d7bbcb9644
1 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,7 @@
using System.IO;
using Microsoft.AspNet.ConfigurationModel;
using Microsoft.AspNet.DependencyInjection;
using Microsoft.AspNet.DependencyInjection.Fallback;
using Microsoft.Net.Runtime;
namespace Microsoft.AspNet.Hosting
@ -29,7 +30,8 @@ namespace Microsoft.AspNet.Hosting
var serviceCollection = new ServiceCollection();
serviceCollection.Add(HostingServices.GetDefaultServices(config));
var services = serviceCollection.FallbackServices;
var services = serviceCollection.BuildServiceProvider();
serviceCollection.FallbackServices = _serviceProvider;
var appEnvironment = _serviceProvider.GetService<IApplicationEnvironment>();