Understanding WinGet package structure, metadata, and how packages are identified and managed
Packages in WinGet represent installable software applications. Each package contains metadata describing the application, its installers, localization information, and system requirements.
Required metadata in the package’s primary language:
# From manifest.md:125-152 (Windows Terminal example)PackageIdentifier: Microsoft.WindowsTerminalPackageVersion: 1.6.10571.0PackageLocale: en-USPublisher: MicrosoftPublisherURL: https://www.microsoft.com/PrivacyURL: https://privacy.microsoft.com/PackageName: Windows TerminalPackageURL: https://docs.microsoft.com/windows/terminal/License: MITLicenseURL: https://github.com/microsoft/terminal/blob/master/LICENSEShortDescription: The new Windows Terminal, a tabbed command line experience for Windows.Tags:- console- command-line- shell- cmd- powershell- wsl
Packages can include multiple language translations:
# From manifest.md:154-164 (French localization)PackageIdentifier: Microsoft.WindowsTerminalPackageVersion: 1.6.10571.0PackageLocale: fr-FRPublisher: MicrosoftShortDescription: Le nouveau terminal Windows, une expérience de ligne de commande à onglets pour Windows.ManifestType: localeManifestVersion: 1.4.0
The manifest provides methods to aggregate information across installers and localizations:
// From Manifest.h:43-65// Get all tags across localizationsstd::vector<string_t> GetAggregatedTags() const;// Get all commands across installersstd::vector<string_t> GetAggregatedCommands() const;// Get package family names across installers, Case folded.std::vector<string_t> GetPackageFamilyNames() const;// Get product codes across installers, Case folded.std::vector<string_t> GetProductCodes() const;// Get upgrade codes across installers, Case folded.std::vector<string_t> GetUpgradeCodes() const;// Get package names across localizations and installers, Case folded.std::vector<string_t> GetPackageNames() const;// Get publishers across localizations and instalizers, Case folded.std::vector<string_t> GetPublishers() const;
Packages can be installed at user or machine scope:
// From manifest.installer.latest.json:125-131"Scope": { "type": [ "string", "null" ], "enum": [ "user", "machine" ], "description": "Scope indicates if the installer is per user or per machine"}