{"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/294cab2f9b2e03af6b953820c7ab497c3c8b7ad9/src/Components/Components/src/Reflection/ComponentProperties.cs#L197-L233","documentation":"Thrown by ComponentProperties.ThrowForUnknownIncomingParameterName when no property at all on the component matches the incoming parameter name (case-insensitive). The parameter name is simply not declared on the target component type.","triggerScenarios":"A typo in a parameter name in markup; passing a parameter that exists on a different component; a renamed parameter after a version change.","commonSituations":"Spelling mistake in an attribute name; copy-paste from another component; a library upgrade that renamed a parameter; casing differences that don't match case-insensitively.","solutions":["Check the spelling and casing of the parameter name against the component's declared parameters.","If the component is from a library, verify the parameter exists in that version (check release notes/XML docs).","Use IntelliSense / the component's source to confirm the exact parameter name."],"exampleFix":"// before\n<Child ForeColour=\"red\" />\n\n// after\n<Child ForeColor=\"red\" /> // match the actual property name","handlingStrategy":"validation","validationCode":"// Verify a parameter name exists (case-insensitively) on a component type.\nstatic bool ParameterExists(Type componentType, string name)\n    => componentType.GetProperty(name,\n        BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase) is not null;","typeGuard":"static bool HasPropertyNamed(Type t, string name)\n    => t.GetProperty(name, BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase) is not null;","tryCatchPattern":null,"preventionTips":["Double-check spelling and casing of every attribute against the component's parameters.","After a library upgrade, review release notes for renamed parameters.","Prefer IntelliSense/compile-time checks over hand-typed attribute names.","If copy-pasting markup between components, re-verify each attribute name."],"tags":["blazor","parameters","typo","reflection","rendering"],"analyzedSha":"294cab2f9b2e03af6b953820c7ab497c3c8b7ad9","analyzedAt":"2026-08-06T20:08:02.189Z","schemaVersion":2},"datasetVersion":"2026-08-06T23:17:07.152Z"}