{"record":{"id":"ae5ad6079222b57e","repo":"lucasg/Dependencies","slug":"x-exception-0-s","errorCode":null,"errorMessage":"[x] Exception : {0:s}","messagePattern":"\\[x\\] Exception : (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"Dependencies/Program.cs","lineNumber":141,"sourceCode":"                }\n            }\n        }\n\n\n        public void PrettyPrint()\n        {\n            Console.WriteLine(\"[-] Manifest for file : {0}\", Application.Filepath);\n\n            if (Manifest.Length == 0)\n            {\n                Console.WriteLine(\"[x] No embedded pe manifest for file {0:s}\", Application.Filepath);\n                return;\n            }\n\n            if (Exception.Length != 0)\n            {\n                Console.Error.WriteLine(\"[x] \\\"Malformed\\\" pe manifest for file {0:s} : {1:s}\", Application.Filepath, Manifest);\n                Console.Error.WriteLine(\"[x] Exception : {0:s}\", Exception);\n                return;\n            }\n\n            Console.WriteLine(XmlManifest);\n        }\n\n        public string Manifest;\n        public XDocument XmlManifest;\n\n        // stays private in order not end up in the json output\n        private PE Application;\n        private string Exception;\n    }\n\n    class PEImports : IPrettyPrintable\n    {\n        public PEImports(PE _Application)\n        {","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/lucasg/Dependencies/blob/1997a40000b77bd3326cbc33672a7b9f78bb23f3/Dependencies/Program.cs#L123-L159","documentation":"Companion line to error 0, printed immediately after it by PEManifest.PrettyPrint() (Program.cs:141). It dumps the private Exception field, which the constructor populated with e.ToString() from the XmlException raised by SxsManifest.ParseSxsManifest (Program.cs:122). It gives the exact parser location (line/column) of the malformed manifest. Same warning semantics: non-fatal, stderr only.","triggerScenarios":"Any invocation that reaches PEManifest.PrettyPrint() with Exception.Length != 0, i.e. the manifest resource was present but failed XML parsing during construction (Program.cs:117-123).","commonSituations":"Same as error 0: corrupted/truncated/encoding-mangled RT_MANIFEST resources; manifests produced by buggy build tooling or modified post-link.","solutions":["Use the XmlException line/column reported in this output to pinpoint the exact byte that broke parsing.","Fix the manifest at the source and rebuild, then re-run `-manifest` to confirm XmlManifest is produced.","If unfixable, treat the PE as manifest-less and avoid code paths that dereference XmlManifest (which will be null)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"var pm = new PEManifest(pe);\nbool manifestOk = string.IsNullOrEmpty(pm.Manifest) || pm.XmlManifest != null;\nif (!manifestOk)\n{\n    // XmlManifest is null; the constructor stored the XmlException details privately.\n    // Surface your own diagnostic instead of relying on PrettyPrint's stderr lines.\n    Console.Error.WriteLine($\"Manifest parse failed for {pe.Filepath}; raw manifest ignored.\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat the private Exception field as the source of truth for parse failure: if XmlManifest is null and Manifest is non-empty, parsing failed.","Do not call PrettyPrint in automated pipelines if stderr noise is undesirable; inspect XmlManifest directly."],"tags":["pe-manifest","xml","exception-detail","stderr","cli"],"backgroundTag":null,"analyzedSha":"1997a40000b77bd3326cbc33672a7b9f78bb23f3","analyzedAt":"2026-08-13T18:14:41.696Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}