{"record":{"id":"a05b590b1131cbab","repo":"icsharpcode/ILSpy","slug":"type","errorCode":null,"errorMessage":"{type}","messagePattern":"\\{type\\}","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"ICSharpCode.BamlDecompiler/Handlers/Records/PropertyCustomHandler.cs","lineNumber":160,"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.ReadByte());\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.U2:\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.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","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/icsharpcode/ILSpy/blob/60c08fcb74fcc183130f73c861ed35cf944d0bf1/ICSharpCode.BamlDecompiler/Handlers/Records/PropertyCustomHandler.cs#L142-L178","documentation":"Thrown from PropertyCustomHandler.Deserialize while reading a XamlInt32CollectionSerializer value. The first byte is cast to IntegerCollectionType; only Consecutive, U1, U2, I4 are handled and the default branch throws NotSupportedException(type.ToString()). The message is therefore the numeric/enum value of the unknown sub-type.","triggerScenarios":"A PropertyCustom BAML record uses the Int32-collection serializer, but its collection-encoding byte is not one of Consecutive(1)/U2(2)/U1... actually Unknown(0)/Consecutive/U1/U2/I4, so the default branch fires.","commonSituations":"Malformed BAML geometry/collection data; a newer collection encoding not yet handled.","solutions":["Inspect the PropertyCustom record's Data to see the unknown sub-type byte.","Re-extract the resource from a clean assembly.","Report the sub-type value as an unsupported encoding."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    SafeDecompile(bamlResource);\n} catch (NotSupportedException ex) when (ex.Message.Contains(\"IntegerCollection\")) {\n    // unsupported Int32 collection encoding; skip the resource\n}","preventionTips":["Wrap BAML translation so an unknown serializer encoding degrades gracefully."],"tags":["baml","xaml","parsing"],"backgroundTag":null,"analyzedSha":"60c08fcb74fcc183130f73c861ed35cf944d0bf1","analyzedAt":"2026-08-13T11:34:51.223Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}