{"record":{"id":"8ff3ddd06639d108","repo":"Devolutions/UniGetUI","slug":"no-package-manager-matching-managername-was-fo","errorCode":null,"errorMessage":"No package manager matching \"{managerName}\" was found.","messagePattern":"No package manager matching \"(.+?)\" was found\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/UniGetUI.Interface.IpcApi/IpcManagerSettingsApi.cs","lineNumber":340,"sourceCode":"            Message = operation.Status switch\n            {\n                OperationStatus.Succeeded => null,\n                OperationStatus.Canceled => \"The operation was canceled.\",\n                _ => operation.GetOutput().LastOrDefault().Item1,\n            },\n            Source = ToSourceInfo(source, isKnown: true, isConfigured: true),\n        };\n    }\n\n    internal static IReadOnlyList<IPackageManager> ResolveManagers(string? managerName)\n    {\n        var managers = PEInterface.Managers\n            .Where(manager => MatchesManagerId(manager, managerName))\n            .ToArray();\n\n        if (managers.Length == 0)\n        {\n            throw new InvalidOperationException(\n                string.IsNullOrWhiteSpace(managerName)\n                    ? \"No package managers are available.\"\n                    : $\"No package manager matching \\\"{managerName}\\\" was found.\"\n            );\n        }\n\n        return managers;\n    }\n\n    internal static IPackageManager ResolveManager(string managerName)\n    {\n        if (string.IsNullOrWhiteSpace(managerName))\n        {\n            throw new InvalidOperationException(\"The manager parameter is required.\");\n        }\n\n        return ResolveManagers(managerName).First();\n    }","sourceCodeStart":322,"sourceCodeEnd":358,"githubUrl":"https://github.com/Devolutions/UniGetUI/blob/9b1d7d0eab91620fc15c86b36676532095936ae3/src/UniGetUI.Interface.IpcApi/IpcManagerSettingsApi.cs#L322-L358","documentation":"Thrown by ResolveManagers when a specific managerName was provided (non-whitespace) but no manager's Id matches it case-insensitively via MatchesManagerId. Note: MatchesManagerId only compares manager.Id — it does NOT check manager.Name or DisplayName, unlike ResolveImportedManager which checks all three.","triggerScenarios":"Calling any API path through ResolveManagers (e.g., ListSources) with a managerName that does not match any manager's Id property. Using the manager's DisplayName or Name instead of its Id will fail here, since only Id is checked.","commonSituations":"Using a human-readable name like 'Winget' when the Id is 'winget' (case sensitivity is handled, but a completely different string won't match). Using a manager Name ('WinGet') when the API expects the Id (which may differ). Typo in the manager name string.","solutions":["Use the exact manager Id — call ListManagers() to see valid Id values.","If matching by Name or DisplayName is needed, use ResolveImportedManager which checks all three fields.","Check for typos or casing issues — matching is case-insensitive but otherwise exact on the Id field."],"exampleFix":"// before — using Display name instead of Id\nvar sources = IpcManagerSettingsApi.ListSources(\"Windows Package Manager\");\n// after\nvar managers = IpcManagerSettingsApi.ListManagers();\nvar wingetId = managers.First(m => m.Name == \"WinGet\").Name; // or use the actual Id\nvar sources = IpcManagerSettingsApi.ListSources(wingetId);","handlingStrategy":"validation","validationCode":"var validIds = IpcManagerSettingsApi.ListManagers().Select(m => m.Name).ToHashSet(StringComparer.OrdinalIgnoreCase);\nif (!string.IsNullOrWhiteSpace(managerName) && !validIds.Contains(managerName))\n    throw new ArgumentException($\"Unknown manager: {managerName}. Valid: {string.Join(\", \", validIds)}\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the manager Id, not Name or DisplayName — MatchesManagerId only checks Id.","Call ListManagers() to get the authoritative list of valid identifiers.","Note the asymmetry: ResolveImportedManager checks Id, Name, and DisplayName, but ResolveManagers only checks Id."],"tags":["package-manager","ipc","validation","lookup"],"backgroundTag":null,"analyzedSha":"9b1d7d0eab91620fc15c86b36676532095936ae3","analyzedAt":"2026-08-13T12:19:18.278Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}