diff --git a/build/dependencies.props b/build/dependencies.props index 6bad2ab449..b625e8781a 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -21,9 +21,9 @@ 2.1.0-preview2-30355 2.1.0-preview2-30355 2.1.0-preview2-30355 - 2.1.0-a-preview2-application-part-18617 + 2.1.0-a-preview2-app-part-18627 2.1.0-preview2-30355 - 2.1.0-a-preview2-application-part-18617 + 2.1.0-a-preview2-app-part-18627 2.1.0-preview2-30355 2.1.0-preview2-30355 2.1.0-preview2-30355 diff --git a/src/UI/IdentityBuilderUIExtensions.cs b/src/UI/IdentityBuilderUIExtensions.cs index fd65649772..33193dd8d6 100644 --- a/src/UI/IdentityBuilderUIExtensions.cs +++ b/src/UI/IdentityBuilderUIExtensions.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System.Linq; using Microsoft.AspNetCore.Identity.UI; using Microsoft.AspNetCore.Identity.UI.Services; using Microsoft.AspNetCore.Mvc.ApplicationParts; @@ -54,10 +55,11 @@ namespace Microsoft.AspNetCore.Identity { var thisAssembly = typeof(IdentityBuilderUIExtensions).Assembly; var relatedAssemblies = RelatedAssemblyAttribute.GetRelatedAssemblies(thisAssembly, throwOnError: true); + var relatedParts = relatedAssemblies.SelectMany(CompiledRazorAssemblyApplicationPartFactory.GetDefaultApplicationParts); - foreach (var assembly in relatedAssemblies) + foreach (var part in relatedParts) { - partManager.ApplicationParts.Add(new CompiledRazorAssemblyPart(assembly)); + partManager.ApplicationParts.Add(part); } }); } diff --git a/src/UI/Microsoft.AspNetCore.Identity.UI.csproj b/src/UI/Microsoft.AspNetCore.Identity.UI.csproj index 7e75bee44d..e81d9c1a8d 100644 --- a/src/UI/Microsoft.AspNetCore.Identity.UI.csproj +++ b/src/UI/Microsoft.AspNetCore.Identity.UI.csproj @@ -8,7 +8,7 @@ aspnetcore;identity;membership;razorpages false true - false + Microsoft.AspNetCore.Mvc.ApplicationParts.NullApplicationPartFactory, Microsoft.AspNetCore.Mvc.Core