{"record":{"id":"4261258ce160f236","repo":"icsharpcode/ILSpy","slug":"ser","errorCode":null,"errorMessage":"{ser}","messagePattern":"\\{ser\\}","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"ICSharpCode.BamlDecompiler/Handlers/Records/PropertyCustomHandler.cs","lineNumber":166,"sourceCode":"\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tfor (int i = 0; i < count; i++)\r\n\t\t\t\t\t\t\t\t\tsb.AppendFormat(CultureInfo.InvariantCulture, \"{0:D}\", reader.ReadUInt16());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase IntegerCollectionType.I4:\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tfor (int i = 0; i < count; i++)\r\n\t\t\t\t\t\t\t\t\tsb.AppendFormat(CultureInfo.InvariantCulture, \"{0:D}\", reader.ReadInt32());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\tthrow new NotSupportedException(type.ToString());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn sb.ToString().Trim();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthrow new NotSupportedException(ser.ToString());\r\n\t\t}\r\n\r\n\t\tprivate bool NeedsFullName(XamlProperty property, XamlContext ctx, XElement elem)\r\n\t\t{\r\n\t\t\tXElement p = elem.Parent;\r\n\t\t\twhile (p != null && p.Annotation<XamlType>()?.ResolvedType.FullName != \"System.Windows.Style\")\r\n\t\t\t{\r\n\t\t\t\tp = p.Parent;\r\n\t\t\t}\r\n\t\t\tvar type = p?.Annotation<TargetTypeAnnotation>()?.Type;\r\n\t\t\tif (type == null)\r\n\t\t\t\treturn true;\r\n\t\t\treturn property.IsAttachedTo(type);\r\n\t\t}\r\n\r\n\t\tpublic BamlElement Translate(XamlContext ctx, BamlNode node, BamlElement parent)\r\n\t\t{\r\n\t\t\tvar record = (PropertyCustomRecord)((BamlRecordNode)node).Record;\r","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/icsharpcode/ILSpy/blob/60c08fcb74fcc183130f73c861ed35cf944d0bf1/ICSharpCode.BamlDecompiler/Handlers/Records/PropertyCustomHandler.cs#L148-L184","documentation":"Thrown at the end of PropertyCustomHandler.Deserialize when the record's serializer KnownTypes id is none of the handled converters (DependencyPropertyConverter, EnumConverter, BooleanConverter, XamlBrushSerializer, XamlPathDataSerializer, the Point/Vector3D/Point3D collection serializers, XamlInt32CollectionSerializer). NotSupportedException(ser.ToString()) reports the offending KnownTypes value.","triggerScenarios":"A PropertyCustom record references a serializer type id that this handler does not implement.","commonSituations":"BAML using an uncommon XAML serializer; a newer serializer id; corrupted serializer id byte.","solutions":["Identify the serializer id (ser) in the message and check whether a newer ILSpy supports it.","Re-extract from a clean assembly to rule out corruption.","Report the unsupported serializer."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    SafeDecompile(bamlResource);\n} catch (NotSupportedException) {\n    // a PropertyCustom serializer this build cannot handle\n}","preventionTips":["Catch NotSupportedException around BAML translation so one bad property does not abort the whole resource."],"tags":["baml","xaml","parsing"],"backgroundTag":null,"analyzedSha":"60c08fcb74fcc183130f73c861ed35cf944d0bf1","analyzedAt":"2026-08-13T11:34:51.223Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}