{"record":{"id":"5097ef815cced0f9","repo":"dotnet/wpf","slug":"reachpackaging-notvalidsignaturedefinitionelement","errorCode":null,"errorMessage":"ReachPackaging_NotValidSignatureDefinitionElement","messagePattern":"ReachPackaging_NotValidSignatureDefinitionElement","errorType":"exception","errorClass":"XpsPackagingException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XPSSignatureDefinition.cs","lineNumber":560,"sourceCode":"            if (reader.Name == XpsS0Markup.SpotLocation)\n            {\n                ReadAttributes(reader);\n            }\n            else if (reader.Name == XpsS0Markup.Intent)\n            {\n                Intent = ReadData(reader);\n            }\n            else if (reader.Name == XpsS0Markup.SignBy)\n            {\n                SignBy = DateTime.Parse(ReadData(reader), System.Globalization.CultureInfo.InvariantCulture);\n            }\n            else if (reader.Name == XpsS0Markup.SigningLocale)\n            {\n                SigningLocale = ReadData(reader);\n            }\n            else\n            {\n                throw new XpsPackagingException(SR.Format(SR.ReachPackaging_NotValidSignatureDefinitionElement, reader.Name));\n            }\n        }\n\n        private\n        string\n        ReadData( XmlReader reader )\n        {\n            string data = null;\n            if (!reader.IsEmptyElement)\n            {\n                bool endLoop = false;\n                while (reader.Read() && !endLoop)\n                {\n                    switch (reader.NodeType)\n                    {\n                        case XmlNodeType.Text:\n                            data = reader.Value;\n                            endLoop = true;","sourceCodeStart":542,"sourceCodeEnd":578,"githubUrl":"https://github.com/dotnet/wpf/blob/81131a70a4c573cd62748a5c36908fc4d662daa9/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XPSSignatureDefinition.cs#L542-L578","documentation":"ReadElement throws this XpsPackagingException when it encounters a child element inside a SignatureDefinition whose name is not one of the allowed elements (SpotLocation, Intent, SignBy, SigningLocale, etc.). The signature definition XML in the package contains an unknown or misplaced element.","triggerScenarios":"Thrown at src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XPSSignatureDefinition.cs:560 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Only include allowed child elements (SpotLocation, Intent, SignBy, SigningLocale, SignaturePart references) in the SignatureDefinition element","Remove the unexpected element from the XPS markup before reparsing","Catch XpsPackagingException around signature-definition parsing and skip or repair the invalid definition"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"81131a70a4c573cd62748a5c36908fc4d662daa9","analyzedAt":"2026-09-14T10:12:48.479Z","contentChangedAt":"2026-09-14T10:12:48.479Z","schemaVersion":2},"datasetVersion":"2026-09-22T01:17:13.364Z"}