{"record":{"id":"68c9ea95a076c358","repo":"tui-cs/Terminal.Gui","slug":"propertyname-unrecognized-scheme-attribute-name","errorCode":null,"errorMessage":"{propertyName}: Unrecognized Scheme Attribute name.","messagePattern":"(.+?): Unrecognized Scheme Attribute name\\.","errorType":"exception","errorClass":"JsonException","httpStatus":null,"severity":"error","filePath":"Terminal.Gui/Configuration/SchemeJsonConverter.cs","lineNumber":70,"sourceCode":"                    \"hotactive\" => scheme with { HotActive = attribute },\n                    \"highlight\" => scheme with { Highlight = attribute },\n                    \"editable\" => scheme with { Editable = attribute },\n                    \"readonly\" => scheme with { ReadOnly = attribute },\n                    \"disabled\" => scheme with { Disabled = attribute },\n                    \"code\" => scheme with { Code = attribute },\n                    \"codecomment\" => scheme with { CodeComment = attribute },\n                    \"codekeyword\" => scheme with { CodeKeyword = attribute },\n                    \"codestring\" => scheme with { CodeString = attribute },\n                    \"codenumber\" => scheme with { CodeNumber = attribute },\n                    \"codeoperator\" => scheme with { CodeOperator = attribute },\n                    \"codetype\" => scheme with { CodeType = attribute },\n                    \"codepreprocessor\" => scheme with { CodePreprocessor = attribute },\n                    \"codeidentifier\" => scheme with { CodeIdentifier = attribute },\n                    \"codeconstant\" => scheme with { CodeConstant = attribute },\n                    \"codepunctuation\" => scheme with { CodePunctuation = attribute },\n                    \"codefunctionname\" => scheme with { CodeFunctionName = attribute },\n                    \"codeattribute\" => scheme with { CodeAttribute = attribute },\n                    _ => throw new JsonException ($\"{propertyName}: Unrecognized Scheme Attribute name.\")\n                };\n            }\n            else\n            {\n                throw new JsonException (\"null property name.\");\n            }\n        }\n\n        throw new JsonException ($\"After {propertyName}: Invalid Json.\");\n    }\n\n    /// <inheritdoc/>\n    public override void Write (Utf8JsonWriter writer, Scheme value, JsonSerializerOptions options)\n    {\n        writer.WriteStartObject ();\n\n        foreach (VisualRole role in Enum.GetValues<VisualRole> ())\n        {","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/tui-cs/Terminal.Gui/blob/2e47b11478db083499917f2ad27c34d30efb0df1/Terminal.Gui/Configuration/SchemeJsonConverter.cs#L52-L88","documentation":"A property name inside a Scheme object does not match any known VisualRole (matched case-insensitively). The converter accepts a fixed set: Normal, HotNormal, Focus, HotFocus, Active, HotActive, Highlight, Editable, ReadOnly, Disabled, and the Code* roles. Any other name is rejected.","triggerScenarios":"A typo like \"Normla\", an outdated role name from a previous version, or a non-role name (e.g. \"Background\", \"Selected\").","commonSituations":"Upgrading Terminal.Gui across versions where role names changed; copying a role name from outdated docs; plain typos.","solutions":["Use a valid VisualRole name (see the VisualRole enum and the switch arms in SchemeJsonConverter).","Check the current version's VisualRole enum for the exact spelling.","Remove the unrecognized role entry."],"exampleFix":"// before\n{ \"Normla\": {\"Foreground\":\"White\"} }\n// after\n{ \"Normal\": {\"Foreground\":\"White\"} }","handlingStrategy":"validation","validationCode":"static readonly HashSet<string> ValidRoles =\n    new (Enum.GetNames<VisualRole> (), StringComparer.OrdinalIgnoreCase);\n\nstatic bool IsValidRole (string name) => ValidRoles.Contains (name);","typeGuard":null,"tryCatchPattern":"try { ConfigurationManager.Apply (); }\ncatch (JsonException ex) when (ex.Message.Contains (\"Unrecognized Scheme Attribute name\"))\n{ /* ex.Message names the bad role */ }","preventionTips":["Cross-reference role names with the VisualRole enum for your Terminal.Gui version.","When upgrading, diff your theme against the new default theme for renamed roles."],"tags":["config","json","scheme","theming","version"],"backgroundTag":null,"analyzedSha":"2e47b11478db083499917f2ad27c34d30efb0df1","analyzedAt":"2026-08-13T19:20:08.826Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}