{"record":{"id":"e3e56f5a8ba7a894","repo":"dotnet/maui","slug":"xc0001-e3e56f","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/SetPropertiesVisitor.cs","lineNumber":1405,"sourceCode":"\n\t\t\tthrow new BuildException(MemberResolution, iXmlLineInfo, null, localName);\n\t\t}\n\n\t\tpublic static IEnumerable<Instruction> GetPropertyValue(VariableDefinition parent, XmlName propertyName, ILContext context, IXmlLineInfo lineInfo, out TypeReference propertyType)\n\t\t{\n\t\t\tvar module = context.Body.Method.Module;\n\t\t\tvar localName = propertyName.LocalName;\n\t\t\tvar bpRef = GetBindablePropertyReference(parent, propertyName.NamespaceURI, ref localName, out var attached, context, lineInfo);\n\n\t\t\t//If it's a BP, GetValue ()\n\t\t\tif (CanGetValue(parent, bpRef, attached, lineInfo, context, out _))\n\t\t\t\treturn GetValue(parent, bpRef, lineInfo, context, out propertyType);\n\n\t\t\t//If it's a property, get it\n\t\t\tif (CanGet(parent, localName, context, out _))\n\t\t\t\treturn Get(parent, localName, lineInfo, context, out propertyType);\n\n\t\t\tthrow new BuildException(PropertyResolution, lineInfo, null, localName, parent.VariableType.FullName);\n\t\t}\n\n\t\tstatic FieldReference GetBindablePropertyReference(VariableDefinition parent, string namespaceURI, ref string localName, out bool attached, ILContext context, IXmlLineInfo iXmlLineInfo)\n\t\t\t=> GetBindablePropertyReference(parent.VariableType, namespaceURI, ref localName, out attached, context, iXmlLineInfo);\n\n\t\tpublic static FieldReference GetBindablePropertyReference(TypeReference bpOwnerType, string namespaceURI, ref string localName, out bool attached, ILContext context, IXmlLineInfo iXmlLineInfo)\n\t\t{\n\t\t\tvar module = context.Body.Method.Module;\n\n\t\t\t//If it's an attached BP, update elementType and propertyName\n\t\t\tattached = GetNameAndTypeRef(ref bpOwnerType, namespaceURI, ref localName, context, iXmlLineInfo);\n\t\t\tvar name = $\"{localName}Property\";\n\t\t\tFieldDefinition bpDef = bpOwnerType.GetField(context.Cache,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfd => fd.Name == name &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfd.IsStatic &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(fd.IsPublic || fd.IsAssembly), out TypeReference declaringTypeReference);\n\t\t\tif (bpDef == null)\n\t\t\t\treturn null;","sourceCodeStart":1387,"sourceCodeEnd":1423,"githubUrl":"https://github.com/dotnet/maui/blob/f377ff1c5ee04d334d8a925f50c83a6b7afddf03/src/Controls/src/Build.Tasks/SetPropertiesVisitor.cs#L1387-L1423","documentation":"Thrown by GetPropertyValue when neither a BindableProperty getter nor a public instance get-property named localName can be resolved on the parent type. The compiler cannot read the property to get or bind it.","triggerScenarios":"Reading a property (e.g. in a binding or GetPropertyValue) that does not exist on the type, has no public non-static getter, or is not a BindableProperty.","commonSituations":"Binding to a property that was renamed/removed; property is private, write-only, or static; wrong type resolved for the parent.","solutions":["Ensure a public, non-static, gettable property (or BindableProperty) with that exact name exists on the type.","Rebuild referencing the assembly that defines the property.","Check for typos and namespace/type-resolution issues on the parent element."],"exampleFix":"// before (private / no getter)\npublic string Title { private get; set; }\n\n// after\npublic string Title { get; set; }","handlingStrategy":"validation","validationCode":"// Property must have a public, non-static getter (or be a BindableProperty)\nstatic bool IsXamlReadable(Type owner, string name)\n{\n    var p = owner.GetProperty(name);\n    return p != null && p.GetMethod != null && p.GetMethod.IsPublic && !p.GetMethod.IsStatic;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Expose public, non-static getters on properties used in bindings.","Rebuild referencing assemblies after renaming/removing bound properties.","Watch for type-resolution mismatches on the parent element."],"tags":["xaml","xamlc","property-resolution","binding"],"backgroundTag":null,"analyzedSha":"f377ff1c5ee04d334d8a925f50c83a6b7afddf03","analyzedAt":"2026-08-13T14:26:18.069Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}