{"record":{"id":"e464c1a717e16417","repo":"dotnet/maui","slug":"xc0001","errorCode":"XC0001","errorMessage":"Cannot resolve property \"{0}\" on type \"{1} (property missing or missing accessors)\".","messagePattern":"Cannot resolve property \"(.+?)\" on type \"(.+?) \\(property missing or missing accessors\\)\"\\.","errorType":"exception","errorClass":"BuildException","httpStatus":null,"severity":"error","filePath":"src/Controls/src/Build.Tasks/CompiledConverters/BindablePropertyConverter.cs","lineNumber":72,"sourceCode":"\t\t\telse if (parts.Length == 2)\n\t\t\t{\n\t\t\t\tvar targetType = parts[0];\n\t\t\t\ttypeName = TypeArgumentsParser.ParseSingle(targetType, node.NamespaceResolver, (IXmlLineInfo)node);\n\t\t\t\tpropertyName = parts[1];\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new BuildException(Conversion, node, null, value, typeof(BindableProperty));\n\n\t\t\tif (typeName == null || propertyName == null)\n\t\t\t\tthrow new BuildException(Conversion, node, null, value, typeof(BindableProperty));\n\n\t\t\tvar typeRef = typeName.GetTypeReference(context.Cache, module, node);\n\t\t\tif (typeRef == null)\n\t\t\t\tthrow new BuildException(TypeResolution, node, null, typeName);\n\n\t\t\tbpRef = GetBindablePropertyFieldReference(context.Cache, typeRef, propertyName, module);\n\t\t\tif (bpRef == null)\n\t\t\t\tthrow new BuildException(PropertyResolution, node, null, propertyName, typeRef.Name);\n\t\t\treturn bpRef;\n\n\t\t\tstatic XmlType GetTargetTypeName(INode node)\n\t\t\t{\n\t\t\t\tvar targetType = ((node as ElementNode).Properties[new XmlName(\"\", \"TargetType\")] as ValueNode)?.Value as string;\n\t\t\t\treturn TypeArgumentsParser.ParseSingle(targetType, node.NamespaceResolver, (IXmlLineInfo)node);\n\t\t\t}\n\t\t}\n\n\t\tstatic XmlType FindTypeNameForVisualState(ElementNode parent, IXmlLineInfo lineInfo, ILContext context)\n\t\t{\n\t\t\t//1. parent is VisualState, don't check that\n\n\t\t\t//2. check that the VS is in a VSG\n\t\t\t// if (!(parent.Parent is IElementNode target) || target.XmlType.NamespaceUri != XamlParser.MauiUri || target.XmlType.Name != nameof(VisualStateGroup))\n\t\t\tif (parent.Parent is not ElementNode target || !target.XmlType.IsOfAnyType(nameof(VisualStateGroup)))\n\t\t\t\tthrow new XamlParseException($\"Expected {nameof(VisualStateGroup)} but found {parent.Parent}\", lineInfo);\n","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/dotnet/maui/blob/f377ff1c5ee04d334d8a925f50c83a6b7afddf03/src/Controls/src/Build.Tasks/CompiledConverters/BindablePropertyConverter.cs#L54-L90","documentation":"XamlC error XC0001 (property resolution). Once the type resolves, the converter looks for a public static field named <propertyName>Property on it. If no such field exists (property missing or its accessors are inaccessible), it throws XC0001.","triggerScenarios":"The property name given does not correspond to a public static BindableProperty field on the resolved type — typo, not a BindableProperty, defined on a different type, or the field is non-public/non-static.","commonSituations":"Misspelling the property name; binding to a plain CLR property that is not backed by a BindableProperty; property declared on a base type but referenced on a derived name; field marked internal.","solutions":["Confirm the exact BindableProperty field name on the type (it must end in 'Property' and be public static).","If the member is not a BindableProperty, either add one or reference an existing one.","Check that the field is visible (public) and on the type you named (or an ancestor reachable by the resolver)."],"exampleFix":"<!-- before -->\n<Setter Property=\"local:MyView.SpacingProperty\" Value=\"10\" />\n<!-- field is actually named 'GapProperty' -->\n\n<!-- after -->\n<Setter Property=\"local:MyView.GapProperty\" Value=\"10\" />","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify each property name maps to a public static <Name>Property field on the named type.","Remember only BindableProperty-backed members are valid for Setter.Property / x:Static bindable references.","Check inheritance: if the field is on a base type, reference the correct type or rely on a properly scoped Style TargetType."],"tags":["xaml","xamlc","property-resolution","bindableproperty","compilation"],"backgroundTag":null,"analyzedSha":"f377ff1c5ee04d334d8a925f50c83a6b7afddf03","analyzedAt":"2026-08-13T14:26:18.069Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}