diff --git a/src/Microsoft.AspNetCore.Razor/Compilation/TagHelpers/TagHelperDescriptorComparer.cs b/src/Microsoft.AspNetCore.Razor/Compilation/TagHelpers/TagHelperDescriptorComparer.cs index 560ebf32b6..3bf1250a76 100644 --- a/src/Microsoft.AspNetCore.Razor/Compilation/TagHelpers/TagHelperDescriptorComparer.cs +++ b/src/Microsoft.AspNetCore.Razor/Compilation/TagHelpers/TagHelperDescriptorComparer.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.Collections; using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Internal; @@ -61,7 +62,10 @@ namespace Microsoft.AspNetCore.Razor.Compilation.TagHelpers descriptorX.AllowedChildren.OrderBy(child => child, StringComparer.OrdinalIgnoreCase), descriptorY.AllowedChildren.OrderBy(child => child, StringComparer.OrdinalIgnoreCase), StringComparer.OrdinalIgnoreCase))) && - descriptorX.TagStructure == descriptorY.TagStructure; + descriptorX.TagStructure == descriptorY.TagStructure && + Enumerable.SequenceEqual( + descriptorX.PropertyBag.OrderBy(propertyX => propertyX.Key, StringComparer.Ordinal), + descriptorY.PropertyBag.OrderBy(propertyY => propertyY.Key, StringComparer.Ordinal)); } ///