diff --git a/Microsoft.AspNet.CoreServices/ActivatorUtilities.cs b/Microsoft.AspNet.CoreServices/ActivatorUtilities.cs index ac5dec543b..1148861b82 100644 --- a/Microsoft.AspNet.CoreServices/ActivatorUtilities.cs +++ b/Microsoft.AspNet.CoreServices/ActivatorUtilities.cs @@ -57,8 +57,8 @@ namespace Microsoft.AspNet.CoreServices throw new ArgumentNullException("type"); } - ConstructorInfo[] constructors = type - .GetConstructors() + ConstructorInfo[] constructors = type.GetTypeInfo() + .DeclaredConstructors .Where(IsInjectable) .ToArray(); diff --git a/Microsoft.AspNet.CoreServices/ServiceProvider.cs b/Microsoft.AspNet.CoreServices/ServiceProvider.cs index a775f6624f..8123fecf41 100644 --- a/Microsoft.AspNet.CoreServices/ServiceProvider.cs +++ b/Microsoft.AspNet.CoreServices/ServiceProvider.cs @@ -1,4 +1,5 @@ using System; +using System.Reflection; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -41,10 +42,10 @@ namespace Microsoft.AspNet.CoreServices private object GetMultiService(Type collectionType) { - if (collectionType.IsGenericType && + if (collectionType.GetTypeInfo().IsGenericType && collectionType.GetGenericTypeDefinition() == typeof(IEnumerable<>)) { - Type serviceType = collectionType.GetGenericArguments().Single(); + Type serviceType = collectionType.GetTypeInfo().GenericTypeArguments.Single(); Type listType = typeof(List<>).MakeGenericType(serviceType); var services = (IList)Activator.CreateInstance(listType); diff --git a/Microsoft.AspNet.CoreServices/project.json b/Microsoft.AspNet.CoreServices/project.json index 1f0248e6cb..ba570aacfc 100644 --- a/Microsoft.AspNet.CoreServices/project.json +++ b/Microsoft.AspNet.CoreServices/project.json @@ -1,6 +1,7 @@ { "dependencies": [], "configurations": [ - { "net45": {} } + { "net45": {} }, + { "k10": {} } ] } \ No newline at end of file diff --git a/Microsoft.AspNet.Mvc/project.json b/Microsoft.AspNet.Mvc/project.json index 876e410925..3ceec27285 100644 --- a/Microsoft.AspNet.Mvc/project.json +++ b/Microsoft.AspNet.Mvc/project.json @@ -11,7 +11,8 @@ "dependencies": [ { "System.Net.Http" : { } } ] - } + }, + "k10" : { } } ] } \ No newline at end of file