Skip to main content
The validate command validates package manifest files for syntax, schema compliance, and logical consistency.

Syntax

winget validate <manifest> [options]

Required Arguments

manifest
path
required
Path to manifest file or directory containing manifest files

Options

--manifest
path
Manifest path (alternative to positional argument)
--ignore-warnings
flag
Treat warnings as non-fatal (validation still succeeds)

Examples

Validate single manifest:
winget validate manifest.yaml
Validate manifest directory:
winget validate ./manifests/
Validate ignoring warnings:
winget validate manifest.yaml --ignore-warnings

Validation Checks

The validate command checks:
  1. YAML Syntax - Valid YAML format
  2. Schema Compliance - Matches WinGet manifest schema
  3. Required Fields - All mandatory fields present
  4. Data Types - Correct types for all fields
  5. Field Formats - URLs, versions, etc. are well-formed
  6. Logical Consistency - Dependencies, installers, etc. are valid
  7. Hash Validation - Installer hashes match if provided

Output Format

Valid Manifest

Validating manifest: Microsoft.PowerToys.yaml

✓ YAML syntax valid
✓ Schema version 1.5.0
✓ All required fields present
✓ All fields valid
✓ Dependencies valid
✓ Installer URLs accessible
✓ Hashes valid

Manifest is valid!

Invalid Manifest

Validating manifest: Invalid.yaml

✓ YAML syntax valid
✗ Schema validation failed

Errors:
  Line 5: Missing required field 'PackageVersion'
  Line 12: Invalid URL format for 'InstallerUrl'
  Line 18: Installer hash mismatch
  Line 25: Unknown field 'InvalidField'

Manifest is invalid.

Warnings

Validating manifest: Package.yaml

✓ All validations passed

Warnings:
  Line 10: Recommended field 'Publisher' is missing
  Line 15: Installer size not specified

Manifest is valid with warnings.

Manifest Structure

Valid WinGet manifests follow this structure:
PackageIdentifier: Publisher.PackageName
PackageVersion: 1.0.0
PackageLocale: en-US
Publisher: Publisher Name
PackageName: Package Name
License: MIT
ShortDescription: Brief description
Installers:
  - Architecture: x64
    InstallerType: exe
    InstallerUrl: https://example.com/installer.exe
    InstallerSha256: abc123...
ManifestType: singleton
ManifestVersion: 1.5.0

Multi-File Manifests

For multi-file manifests (version, installer, locale, defaultLocale):
winget validate ./manifests/microsoft/powertoys/0.71.0/
Validates all manifest files in the directory.

Common Errors

Missing Required Field

Error: Missing required field 'PackageVersion'

Invalid Format

Error: Invalid URL format for 'InstallerUrl'
Expected: https://example.com/installer.exe
Found: not-a-url

Hash Mismatch

Error: Installer hash mismatch
Expected: abc123...
Actual: def456...

Exit Codes

  • 0 - Manifest is valid
  • 0x8A15003E - Manifest syntax error
  • 0x8A15003F - Manifest validation error
  • 0x8A150040 - Manifest has warnings (without —ignore-warnings)
The validate command is primarily used by manifest contributors to verify manifests before submitting to the WinGet repository.
Manifest validation includes downloading and checking installer hashes, which may take time for large installers.

Build docs developers (and LLMs) love