{"record":{"id":"587fabc70ffc0d72","repo":"dotnet/maui","slug":"xc0000","errorCode":"XC0000","errorMessage":"Cannot resolve type \"{0}\".","messagePattern":"Cannot resolve type \"(.+?)\"\\.","errorType":"exception","errorClass":"BuildException","httpStatus":null,"severity":"error","filePath":"src/Controls/src/Build.Tasks/CompiledConverters/BindablePropertyConverter.cs","lineNumber":68,"sourceCode":"\t\t\t\t\ttypeName = GetTargetTypeName(node.Parent);\n\t\t\t\t}\n\t\t\t\tpropertyName = parts[0];\n\t\t\t}\n\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","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/dotnet/maui/blob/f377ff1c5ee04d334d8a925f50c83a6b7afddf03/src/Controls/src/Build.Tasks/CompiledConverters/BindablePropertyConverter.cs#L50-L86","documentation":"XamlC error XC0000 (general type resolution). After parsing the type name from the value or from a Style TargetType, the converter calls GetTypeReference; if the named type cannot be resolved against loaded assemblies, it throws XC0000.","triggerScenarios":"The type referenced in the BindableProperty value (or the TargetType that feeds it) does not resolve: wrong name, missing xmlns prefix declaration, or the declaring assembly is not referenced.","commonSituations":"Forgot to declare xmlns:local/xmlns:custom; typo in the type name; type lives in a project/assembly not referenced by the app; namespace changed after a rename.","solutions":["Declare or correct the xmlns prefix pointing at the type's CLR namespace and assembly.","Verify the type name spelling and namespace exactly match the declaring type.","Add the missing project/assembly reference that contains the type."],"exampleFix":"<!-- before -->\n<Setter Property=\"MyView.SpacingProperty\" Value=\"10\" />\n<!-- 'MyView' is unresolved -->\n\n<!-- after -->\nxmlns:local=\"clr-namespace:MyLib.Controls;assembly=MyLib\"\n<Setter Property=\"local:MyView.SpacingProperty\" Value=\"10\" />","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Declare every xmlns prefix you reference and keep namespaces current after renames.","Confirm the assembly containing the type is referenced by the app project.","Use IDE IntelliSense / XAML diagnostics to catch unresolved types before build."],"tags":["xaml","xamlc","type-resolution","compilation"],"backgroundTag":null,"analyzedSha":"f377ff1c5ee04d334d8a925f50c83a6b7afddf03","analyzedAt":"2026-08-13T14:26:18.069Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}