diff --git a/src/Microsoft.AspNetCore.Routing/MapRouteRouteBuilderExtensions.cs b/src/Microsoft.AspNetCore.Routing/MapRouteRouteBuilderExtensions.cs index d3cc115e6d..ef55007af3 100644 --- a/src/Microsoft.AspNetCore.Routing/MapRouteRouteBuilderExtensions.cs +++ b/src/Microsoft.AspNetCore.Routing/MapRouteRouteBuilderExtensions.cs @@ -104,7 +104,7 @@ namespace Microsoft.AspNetCore.Builder { if (routeBuilder.DefaultHandler == null) { - throw new RouteCreationException(Resources.DefaultHandler_MustBeSet); + throw new RouteCreationException(Resources.FormatDefaultHandler_MustBeSet(nameof(IRouteBuilder))); } var inlineConstraintResolver = routeBuilder diff --git a/src/Microsoft.AspNetCore.Routing/Properties/Resources.Designer.cs b/src/Microsoft.AspNetCore.Routing/Properties/Resources.Designer.cs index 9dd91e7f85..efc7928b7c 100644 --- a/src/Microsoft.AspNetCore.Routing/Properties/Resources.Designer.cs +++ b/src/Microsoft.AspNetCore.Routing/Properties/Resources.Designer.cs @@ -75,7 +75,7 @@ namespace Microsoft.AspNetCore.Routing } /// - /// A default handler must be set on the RouteCollection. + /// A default handler must be set on the {0}. /// internal static string DefaultHandler_MustBeSet { @@ -83,11 +83,11 @@ namespace Microsoft.AspNetCore.Routing } /// - /// A default handler must be set on the RouteCollection. + /// A default handler must be set on the {0}. /// - internal static string FormatDefaultHandler_MustBeSet() + internal static string FormatDefaultHandler_MustBeSet(object p0) { - return GetString("DefaultHandler_MustBeSet"); + return string.Format(CultureInfo.CurrentCulture, GetString("DefaultHandler_MustBeSet"), p0); } /// diff --git a/src/Microsoft.AspNetCore.Routing/Resources.resx b/src/Microsoft.AspNetCore.Routing/Resources.resx index 6af7dff663..6c3fcc582b 100644 --- a/src/Microsoft.AspNetCore.Routing/Resources.resx +++ b/src/Microsoft.AspNetCore.Routing/Resources.resx @@ -130,7 +130,7 @@ The supplied route name '{0}' is ambiguous and matched more than one route. - A default handler must be set on the RouteCollection. + A default handler must be set on the {0}. The constructor to use for activating the constraint type '{0}' is ambiguous. Multiple constructors were found with the following number of parameters: {1}.