microsoft/aspire · error · InvalidOperationException

Aspire skills bundle manifest must specify…

Error message

Aspire skills bundle manifest must specify supports.aspireCli.

What it means

Even when a supports object exists, ValidateCompatibility requires the supports.aspireCli field to be a non-empty version range string. A missing, null, or whitespace-only aspireCli value throws this error because CLI compatibility cannot be evaluated without it.

Solutions

  1. Set supports.aspireCli to a valid semver range such as ">=9.0.0" in skill-manifest.json
  2. Republish the bundle with the corrected manifest
  3. Pick a different bundle whose manifest declares CLI support

Example fix

// before
"supports": { "aspireSdk": ">=9.0.0" }
// after
"supports": { "aspireCli": ">=9.4.0", "aspireSdk": ">=9.0.0" }
Defensive patterns

Strategy: validation

Validate before calling

if (string.IsNullOrWhiteSpace(manifest.Supports.AspireCli))
    throw new InvalidOperationException("skill-manifest.json supports.aspireCli must be a non-empty version range.");

Type guard

bool HasCliRange(SkillBundleSupports? s) => !string.IsNullOrWhiteSpace(s?.AspireCli);

Try / catch

try
{
    await installer.InstallAsync(bundleRef);
}
catch (InvalidOperationException ex) when (ex.Message.Contains("must specify supports.aspireCli"))
{
    logger.LogError(ex, "Bundle manifest is missing supports.aspireCli; fix the manifest and republish.");
}

Prevention

When it happens

Trigger: skill-manifest.json contains supports but omits aspireCli or sets it to ""/null; triggered from CreateBundle during bundle installation.

Common situations: Authors filling in supports.aspireSdk but forgetting aspireCli, JSON serialization dropping an empty field, or hand-editing the manifest and deleting the value.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of microsoft/aspire@25830f84bd (2026-09-16). Data as JSON: /api/errors/fa5cd7abd51d1df8. Report an issue: GitHub.

Appendix: source

Thrown at src/Aspire.Cli/Agents/AspireSkills/AspireSkillsBundleProvider.cs:635

            if (!string.IsNullOrEmpty(targetFileDirectory))
            {
                Directory.CreateDirectory(targetFileDirectory);
            }

            File.Copy(sourceFile, targetFile, overwrite: true);
        }
    }

    private static void ValidateCompatibility(SkillBundleSupports? supports, string currentCliVersion, string currentSdkVersion)
    {
        if (supports is null)
        {
            throw new InvalidOperationException("Aspire skills bundle manifest must specify supported Aspire versions.");
        }

        if (string.IsNullOrWhiteSpace(supports.AspireCli))
        {
            throw new InvalidOperationException("Aspire skills bundle manifest must specify supports.aspireCli.");
        }

        if (!IsVersionInRange(currentCliVersion, supports.AspireCli))
        {
            throw new InvalidOperationException(string.Format(
                CultureInfo.InvariantCulture,
                "Aspire skills bundle supports Aspire CLI versions '{0}', but the current CLI version is '{1}'.",
                supports.AspireCli,
                currentCliVersion));
        }

        if (!string.IsNullOrWhiteSpace(supports.AspireSdk) &&
            !IsVersionInRange(currentSdkVersion, supports.AspireSdk))
        {
            throw new InvalidOperationException(string.Format(
                CultureInfo.InvariantCulture,
                "Aspire skills bundle supports Aspire SDK versions '{0}', but the current SDK version is '{1}'.",
                supports.AspireSdk,

View on GitHub (pinned to 25830f84bd)