{"record":{"id":"ee2fa86596ecd719","repo":"unoplatform/uno","slug":"unable-to-find-type-fullname","errorCode":null,"errorMessage":"Unable to find type {fullName}","messagePattern":"Unable to find type (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/SourceGenerators/Uno.UI.SourceGenerators/RoslynMetadataHelper.cs","lineNumber":142,"sourceCode":"\t\t\t\tvar setMethod = type?.GetFirstMethodWithName(\"Set\" + name);\n\t\t\t\tif (setMethod?.FindDependencyPropertyType() is { } propertyType)\n\t\t\t\t{\n\t\t\t\t\treturn propertyType;\n\t\t\t\t}\n\n\t\t\t\ttype = type?.BaseType;\n\t\t\t}\n\n\t\t\tthrow new InvalidOperationException($\"No valid setter found for attached property {name}\");\n\t\t}\n\n\t\tpublic ITypeSymbol GetTypeByFullName(string fullName)\n\t\t{\n\t\t\tvar symbol = FindTypeByFullName(fullName);\n\n\t\t\tif (symbol == null)\n\t\t\t{\n\t\t\t\tthrow new InvalidOperationException($\"Unable to find type {fullName}\");\n\t\t\t}\n\n\t\t\treturn symbol;\n\t\t}\n\n\t\tpublic bool IsTypeImplemented(INamedTypeSymbol type) => _isTypeImplemented(type);\n\n\t\tprivate static bool SourceIsTypeImplemented(INamedTypeSymbol type)\n\t\t\t=> type.GetAttributes().None(a => a.AttributeClass?.GetFullyQualifiedTypeExcludingGlobal() == XamlConstants.Types.NotImplementedAttribute);\n\n\t\tpublic ISymbol? FindPropertyByOwnerSymbol(INamedTypeSymbol? type, string propertyName) => _findPropertyByOwnerSymbol!(type, propertyName);\n\n\t\tprivate ISymbol? SourceFindPropertyByOwnerSymbol(INamedTypeSymbol? type, string propertyName)\n\t\t{\n\t\t\tif (string.IsNullOrEmpty(propertyName))\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/unoplatform/uno/blob/04183404888ea21b4e5bfa3493e8d5f15e972c3a/src/SourceGenerators/Uno.UI.SourceGenerators/RoslynMetadataHelper.cs#L124-L160","documentation":"GetTypeByFullName wraps FindTypeByFullName and throws InvalidOperationException if the lookup returns null — i.e. no type with that fully-qualified name exists in any referenced assembly of the compilation.","triggerScenarios":"The generator requests a type by full name that is absent from the compilation because its assembly is not referenced or the name is stale.","commonSituations":"A XAML/code reference to a type whose PackageReference was removed; a namespace rename in a dependency; targeting a TFM that excludes the type's assembly.","solutions":["Add/restore the reference (PackageReference or ProjectReference) for the assembly declaring the type.","Confirm the full name matches the current dependency version (namespace/type may have moved).","Ensure the active TFM includes that assembly."],"exampleFix":"<!-- before: Microsoft.UI.Xaml.Controls not referenced -->\n<ItemGroup>\n  <!-- reference missing -->\n</ItemGroup>\n<!-- after -->\n<ItemGroup>\n  <PackageReference Include=\"Microsoft.UI.Xaml\" Version=\"...\" />\n</ItemGroup>","handlingStrategy":"validation","validationCode":"// Confirm a type by full name is reachable in the compilation before building\nif (Type.GetType(fullName) == null) Console.WriteLine($\"WARN: {fullName} not resolvable; add its reference.\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep references to all assemblies whose types appear in XAML/code.","After renames/upgrades, refresh full type names against the current dependency version."],"tags":["roslyn","xaml","type-resolution","source-generator"],"backgroundTag":null,"analyzedSha":"04183404888ea21b4e5bfa3493e8d5f15e972c3a","analyzedAt":"2026-08-13T21:08:11.651Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}