{"record":{"id":"61c1c8452aae03a7","repo":"tui-cs/Terminal.Gui","slug":"propertyname-unknown-property-name","errorCode":null,"errorMessage":"{propertyName}: Unknown property name.","messagePattern":"(.+?): Unknown property name\\.","errorType":"exception","errorClass":"JsonException","httpStatus":null,"severity":"error","filePath":"Terminal.Gui/Configuration/ScopeJsonConverter.cs","lineNumber":141,"sourceCode":"\n                                                                         return p.Name == propertyName;\n                                                                     }\n\n                                                                     return false;\n                                                                 })\n                                                         .FirstOrDefault ();\n\n                if (property is { })\n                {\n                    // Set the value of propertyName on the scopeT.\n                    PropertyInfo prop = typeof (TScopeT).GetProperty (propertyName!)!;\n\n                    prop.SetValue (scope, JsonSerializer.Deserialize (ref reader, prop.PropertyType, TuiSerializerContext.Instance));\n                }\n                else\n                {\n                    // Unknown property\n                    throw new JsonException ($\"{propertyName}: Unknown property name.\");\n                }\n            }\n        }\n\n        throw new JsonException ($\"{propertyName}: Json error in ScopeJsonConverter\");\n    }\n\n    [UnconditionalSuppressMessage (\"AOT\",\n                                   \"IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.\",\n                                   Justification =\n                                       \"Arbitrary property-level converter fallback is guarded by RuntimeFeature.IsDynamicCodeSupported and is unreachable under NativeAOT.\")]\n    [UnconditionalSuppressMessage (\"Trimming\",\n                                   \"IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code\",\n                                   Justification =\n                                       \"Arbitrary property-level converter fallback is only used when a consumer opts into a custom property-level JsonConverter on JIT-supported runtimes.\")]\n    public override void Write (Utf8JsonWriter writer, TScopeT scope, JsonSerializerOptions options)\n    {\n        writer.WriteStartObject ();","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/tui-cs/Terminal.Gui/blob/2e47b11478db083499917f2ad27c34d30efb0df1/Terminal.Gui/Configuration/ScopeJsonConverter.cs#L123-L159","documentation":"A property name in a scope (Settings/Theme) is neither a recognized hardcoded config property (from GetHardCodedProperty) nor a [JsonInclude]-annotated property on the scope type (like $schema). Unknown names are rejected to catch typos and stale config keys.","triggerScenarios":"A config file with a misspelled or removed key, e.g. \"Themess\" instead of \"Themes\", or a key from a different Terminal.Gui version that does not exist in this version.","commonSituations":"Version mismatch between config and library; typos; copying config from docs written for a different version.","solutions":["Check the property name against the current version's known config properties (GetHardCodedProperty keys).","Remove the unknown property, or correct the spelling.","Regenerate config from the current library defaults after an upgrade."],"exampleFix":"// before\n{ \"Themess\": { ... } }\n// after\n{ \"Themes\": { ... } }","handlingStrategy":"validation","validationCode":"// Compare config keys against the scope's known config properties\nforeach (string key in configFileKeys)\n{\n    if (scope.GetHardCodedProperty (key) is null) /* unknown key */\n}","typeGuard":null,"tryCatchPattern":"try { ConfigurationManager.Apply (); }\ncatch (JsonException ex) when (ex.Message.Contains (\"Unknown property name\"))\n{ /* ex.Message names the unrecognized key */ }","preventionTips":["Keep config version-aligned with the library.","Diff config keys against current defaults after upgrades."],"tags":["config","json","scope","version"],"backgroundTag":null,"analyzedSha":"2e47b11478db083499917f2ad27c34d30efb0df1","analyzedAt":"2026-08-13T19:20:08.826Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}