Overview
PackageCatalog represents a searchable package source. Before using a catalog, you must first obtain a PackageCatalogReference and connect to it. Once connected, you can search for packages using various filters.
Class Definitions
PackageCatalogReference
PackageCatalog
PackageCatalogInfo
Connecting to a Catalog
Basic Connection
Connection with Agreement Acceptance
Some catalogs require accepting source agreements:Authentication
For catalogs requiring authentication:Searching for Packages
FindPackagesOptions
- Selectors - You must match at least ONE selector (OR logic)
- Filters - You must match ALL filters (AND logic)
- Final result =
(Selector1 OR Selector2 OR ...) AND Filter1 AND Filter2 AND ...
PackageMatchFilter
The field to search
The value to match
How to match the value
CatalogDefault- Default search across all fieldsId- Package identifierName- Package nameMoniker- Package moniker (short name)Command- Executable commandTag- Package tagsPackageFamilyName- Package family nameProductCode- Product code
Equals- Case-sensitive exact matchEqualsCaseInsensitive- Case-insensitive exact matchStartsWithCaseInsensitive- Case-insensitive prefix matchContainsCaseInsensitive- Case-insensitive substring match
Basic Search
Search by Name (Partial Match)
Multiple Selectors (OR Logic)
Using Filters (AND Logic)
Search All Packages
Working with Results
FindPackagesResult
Ok- Search successfulBlockedByPolicy- Blocked by group policyCatalogError- Catalog error occurredInternalError- Internal errorInvalidOptions- Invalid search optionsAuthenticationError- Authentication failedAccessDenied- Access denied to catalog
MatchResult
CatalogPackage
Getting Package Metadata
Getting Specific Version
Composite Catalogs
Composite catalogs combine multiple sources for unified searching:LocalCatalogs- Search only local catalogsRemotePackagesFromRemoteCatalogs- Search remote catalogs without checking installed statusRemotePackagesFromAllCatalogs- Search remote catalogs and check local catalogs for installed versionsAllCatalogs- Search both local and remote catalogs
Catalog Refresh
Update a catalog to get the latest package information:Related Types
- PackageManager - Create and manage catalogs
- InstallOptions - Install packages found in catalog
- Error Handling - Handle catalog errors