{"record":{"id":"bd2e054d774129f2","repo":"dotnet/aspnetcore","slug":"the-component-nameof-cascadingvalue-tvalue-d","errorCode":null,"errorMessage":"The component '{nameof(CascadingValue<TValue>)}' does not accept a parameter with the name '{parameter.Name}'.","messagePattern":"The component '(.+?)' does not accept a parameter with the name '(.+?)'\\.","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"src/Components/Components/src/CascadingValue.cs","lineNumber":90,"sourceCode":"            else if (parameter.Name.Equals(nameof(ChildContent), StringComparison.OrdinalIgnoreCase))\n            {\n                ChildContent = (RenderFragment)parameter.Value;\n            }\n            else if (parameter.Name.Equals(nameof(Name), StringComparison.OrdinalIgnoreCase))\n            {\n                Name = (string)parameter.Value;\n                if (string.IsNullOrEmpty(Name))\n                {\n                    throw new ArgumentException($\"The parameter '{nameof(Name)}' for component '{nameof(CascadingValue<TValue>)}' does not allow null or empty values.\");\n                }\n            }\n            else if (parameter.Name.Equals(nameof(IsFixed), StringComparison.OrdinalIgnoreCase))\n            {\n                IsFixed = (bool)parameter.Value;\n            }\n            else\n            {\n                throw new ArgumentException($\"The component '{nameof(CascadingValue<TValue>)}' does not accept a parameter with the name '{parameter.Name}'.\");\n            }\n        }\n\n        if (_hasSetParametersPreviously && IsFixed != previousFixed)\n        {\n            throw new InvalidOperationException($\"The value of {nameof(IsFixed)} cannot be changed dynamically.\");\n        }\n\n        _hasSetParametersPreviously = true;\n\n        // It's OK for the value to be null, but some \"Value\" param must be supplied\n        // because it serves no useful purpose to have a <CascadingValue> otherwise.\n        if (!hasSuppliedValue)\n        {\n            throw new ArgumentException($\"Missing required parameter '{nameof(Value)}' for component '{GetType().Name}'.\");\n        }\n\n        // Rendering is most efficient when things are queued from rootmost to leafmost.","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/dotnet/aspnetcore/blob/294cab2f9b2e03af6b953820c7ab497c3c8b7ad9/src/Components/Components/src/CascadingValue.cs#L72-L108","documentation":"Thrown by CascadingValue<TValue>.SetParametersAsync when it receives a parameter whose name is not one of Value, ChildContent, Name, or IsFixed. CascadingValue only accepts these four parameters; any other attribute in markup is rejected as an ArgumentException rather than silently ignored.","triggerScenarios":"Passing an unrecognized parameter in markup like <CascadingValue SomeOtherProp=\"x\">, or programmatically building a parameter dictionary with a wrong key. The rejection happens in the else branch at CascadingValue.cs:88-91.","commonSituations":"Typo in a parameter name (e.g., <CascadingValue Values=...> instead of Value); confusing CascadingValue with CascadingValueSource API; attempting to pass extra configuration.","solutions":["Check the parameter name spelling — only Value, ChildContent, Name, IsFixed are valid.","If you intended a typed cascading source with more options, use CascadingValueSource<T> registered in DI instead."],"exampleFix":"// before\n<CascadingValue ValueData=\"@_value\">\n    <Child />\n</CascadingValue>\n\n// after\n<CascadingValue Value=\"@_value\">\n    <Child />\n</CascadingValue>","handlingStrategy":"validation","validationCode":"var allowed = new[] { \"Value\", \"ChildContent\", \"Name\", \"IsFixed\" };\nforeach (var p in parameters)\n    if (!allowed.Contains(p.Name))\n        throw new ArgumentException($\"Unknown CascadingValue parameter: {p.Name}\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only use Value, ChildContent, Name, IsFixed on CascadingValue.","Double-check parameter spelling in markup."],"tags":["blazor","cascading-value","parameter-binding"],"analyzedSha":"294cab2f9b2e03af6b953820c7ab497c3c8b7ad9","analyzedAt":"2026-08-06T20:08:02.189Z","schemaVersion":2},"datasetVersion":"2026-08-06T23:17:07.152Z"}