dotnet/aspnetcore · error · InvalidOperationException
The property '{parameterName}' on component type '{targetTyp
Error message
The property '{parameterName}' on component type '{targetType.FullName}' cannot be set using a cascading value. What it means
Thrown by ComponentProperties.ThrowForSettingParameterWithCascadingValue when a non-cascading ([Parameter]-only) property receives a value through the framework's cascading-value pipeline. This is usually an internal/infrastructure condition rather than a user markup error, because users do not directly route cascading values to specific parameters.
Source
Thrown at src/Components/Components/src/Reflection/ComponentProperties.cs:232
{
throw new InvalidOperationException(
$"Object of type '{targetType.FullName}' does not have a property " +
$"matching the name '{parameterName}'.");
}
}
[DoesNotReturn]
private static void ThrowForSettingCascadingParameterWithNonCascadingValue(Type targetType, string parameterName)
{
throw new InvalidOperationException(
$"The property '{parameterName}' on component type '{targetType.FullName}' cannot be set " +
$"explicitly because it only accepts cascading values.");
}
[DoesNotReturn]
private static void ThrowForSettingParameterWithCascadingValue(Type targetType, string parameterName)
{
throw new InvalidOperationException(
$"The property '{parameterName}' on component type '{targetType.FullName}' cannot be set " +
$"using a cascading value.");
}
[DoesNotReturn]
private static void ThrowForCaptureUnmatchedValuesConflict(Type targetType, string parameterName, Dictionary<string, object> unmatched)
{
throw new InvalidOperationException(
$"The property '{parameterName}' on component type '{targetType.FullName}' cannot be set explicitly " +
$"when also used to capture unmatched values. Unmatched values:" + Environment.NewLine +
string.Join(Environment.NewLine, unmatched.Keys));
}
[DoesNotReturn]
private static void ThrowForMultipleCaptureUnmatchedValuesParameters([DynamicallyAccessedMembers(Component)] Type targetType)
{
var propertyNames = new List<string>();
foreach (var property in targetType.GetProperties(BindablePropertyFlags))View on GitHub (pinned to 294cab2f9b)
Solutions
- Verify parameters meant to receive query/route values are attributed correctly (use [SupplyParameterFromQuery] alongside [Parameter]).
- Review custom cascading-value providers to ensure they target cascading parameters, not plain parameters.
- This usually signals an infrastructure misconfiguration - audit how the cascading value is being supplied.
- Check for a framework version regression if the configuration was previously valid.
Example fix
// before: query value routed as cascading to a plain [Parameter]
[Parameter] public int Page { get; set; } // misconfigured query binding
// after
[Parameter] [SupplyParameterFromQuery(Name = "page")]
public int Page { get; set; } Defensive patterns
Strategy: validation
Validate before calling
// Ensure query/route-bound parameters carry the right attributes so the framework
// does not route a cascading value into a plain [Parameter].
static bool IsValidQueryParameter(PropertyInfo p)
=> p.GetCustomAttribute<ParameterAttribute>() is not null
&& p.GetCustomAttribute<SupplyParameterFromQueryAttribute>() is not null; Prevention
- Use [Parameter] together with [SupplyParameterFromQuery] for query-bound parameters, not cascading-value suppliers.
- Audit custom cascading-value suppliers to ensure they target [CascadingParameter] properties only.
- Treat this error as an infrastructure/config signal - review how the cascading value is supplied.
- Watch for framework regressions if a previously-valid setup starts throwing.
When it happens
Trigger: Framework infrastructure (e.g. SupplyParameterFromQuery, custom cascading value suppliers) attempting to deliver a cascading value to a [Parameter]-only property; a misconfigured cascading value supplier targeting the wrong parameter.
Common situations: A custom component that supplies cascading values targeting a non-cascading parameter; mixing [SupplyParameterFromQuery] incorrectly; a framework integration bug routing a query/route value as a cascading value to a plain parameter.
Related errors
- The property '{parameterName}' on component type '{targetTyp
- Unable to set property '{parameterName}' on object of type '
- Object of type '{targetType.FullName}' has a property matchi
- Object of type '{targetType.FullName}' does not have a prope
- The property '{parameterName}' on component type '{targetTyp
AI-assisted analysis of dotnet/aspnetcore@294cab2f9b (2026-08-06).
Data as JSON: /api/errors/7b85d9b0b79307e0.
Report an issue: GitHub.