{"record":{"id":"100045c209f378c5","repo":"dotnet/aspnetcore","slug":"object-of-type-targettype-fullname-does-not-ha","errorCode":null,"errorMessage":"Object of type '{targetType.FullName}' does not have a property matching the name '{parameterName}'.","messagePattern":"Object of type '(.+?)' does not have a property matching the name '(.+?)'\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Components/Components/src/Reflection/ComponentProperties.cs","lineNumber":215,"sourceCode":"        if (propertyInfo != null)\n        {\n            if (!propertyInfo.IsDefined(typeof(ParameterAttribute)) &&\n                !propertyInfo.GetCustomAttributes().OfType<CascadingParameterAttributeBase>().Any())\n            {\n                throw new InvalidOperationException(\n                    $\"Object of type '{targetType.FullName}' has a property matching the name '{parameterName}', \" +\n                    $\"but it does not have [Parameter], [CascadingParameter], or any other parameter-supplying attribute.\");\n            }\n            else\n            {\n                // This should not happen\n                throw new InvalidOperationException(\n                    $\"No writer was cached for the property '{propertyInfo.Name}' on type '{targetType.FullName}'.\");\n            }\n        }\n        else\n        {\n            throw new InvalidOperationException(\n                $\"Object of type '{targetType.FullName}' does not have a property \" +\n                $\"matching the name '{parameterName}'.\");\n        }\n    }\n\n    [DoesNotReturn]\n    private static void ThrowForSettingCascadingParameterWithNonCascadingValue(Type targetType, string parameterName)\n    {\n        throw new InvalidOperationException(\n            $\"The property '{parameterName}' on component type '{targetType.FullName}' cannot be set \" +\n            $\"explicitly because it only accepts cascading values.\");\n    }\n\n    [DoesNotReturn]\n    private static void ThrowForSettingParameterWithCascadingValue(Type targetType, string parameterName)\n    {\n        throw new InvalidOperationException(\n            $\"The property '{parameterName}' on component type '{targetType.FullName}' cannot be set \" +","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/dotnet/aspnetcore/blob/3600ca084e9c8b5f4174fc5e747f4c52d2100806/src/Components/Components/src/Reflection/ComponentProperties.cs#L197-L233","documentation":"The else-branch of ThrowForUnknownIncomingParameterName: the incoming parameter name does not match any property on the component type at all (not even an un-annotated one). The framework received a parameter value it cannot deliver because no property with that name exists. This typically indicates a typo, a stale binding after a property was removed/renamed, or parameters being passed to the wrong component.","triggerScenarios":"Specifying a parameter in markup (e.g., <MyComponent Foo=\"1\" />) where MyComponent has no Foo property. Passing unmatched attributes when the component does not declare a [Parameter(CaptureUnmatchedValues = true)] sink. Renaming a component property and forgetting to update consumers.","commonSituations":"Typos in attribute names in .razor files. Copy-pasting markup between components with different parameter sets. Stale generated code after refactoring. Passing parameters intended for a different component type.","solutions":["Check the spelling and casing of the parameter name against the component's declared parameters.","If the property was renamed, update all consumers to the new name.","To accept arbitrary unmatched attributes, add a property with [Parameter(CaptureUnmatchedValues = true)] of type Dictionary<string, object>."],"exampleFix":"// before\n<Counter Count=\"5\" Dsiplay=\"true\" /> // 'Dsiplay' does not exist\n\n// after\n<Counter Count=\"5\" Display=\"true\" />","handlingStrategy":"validation","validationCode":"// Verify the parameter name exists on the component before rendering.\nvar prop = typeof(MyComponent).GetProperty(\"Foo\",\n    BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase);\nif (prop == null)\n    throw new ArgumentException(\"Unknown parameter 'Foo'\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep a list of valid parameter names per component and validate dynamic parameter dictionaries.","Use the component's XML doc comments as a single source of truth for parameters.","Add CaptureUnmatchedValues sink if arbitrary attributes should be tolerated."],"tags":["blazor","parameters","reflection","binding"],"backgroundTag":null,"analyzedSha":"3600ca084e9c8b5f4174fc5e747f4c52d2100806","analyzedAt":"2026-08-11T16:32:30.678Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}