microsoft/aspire · error · InvalidOperationException
Aspire skills bundle supports Aspire CLI versions
Error message
Aspire skills bundle supports Aspire CLI versions '{0}', but the current CLI version is '{1}'. What it means
The bundle's declared supports.aspireCli range was parsed successfully, but the running Aspire CLI version falls outside it. The provider throws this formatted InvalidOperationException naming the supported range and the actual CLI version, so installing an incompatible bundle is blocked up front.
Solutions
- Upgrade (or downgrade) the Aspire CLI so its version is within the bundle's declared supports.aspireCli range
- Install a bundle version whose supports range includes your CLI version
- If the range is wrong in the bundle, correct it and republish the bundle
Example fix
// before (skill-manifest.json)
"supports": { "aspireCli": ">=10.0.0 <11.0.0" }
// after (when running CLI 9.4.x)
"supports": { "aspireCli": ">=9.0.0 <11.0.0" } Defensive patterns
Strategy: validation
Validate before calling
// compare your CLI version to the bundle's declared range before installing
var cliVersion = typeof(Program).Assembly.GetName().Version;
Console.WriteLine($"Ensure {cliVersion} is within the bundle's supports.aspireCli range before install."); Try / catch
try
{
await installer.InstallFromGitHubAsync(release);
}
catch (InvalidOperationException ex) when (ex.Message.Contains("supports Aspire CLI versions"))
{
// ex.Message includes the supported range and current version
logger.LogError(ex, "CLI/bundle version mismatch — upgrade the CLI or pick a compatible bundle release.");
} Prevention
- Check `aspire --version` against the bundle release notes before installing
- Keep the CLI updated to the latest stable release
- Prefer bundles published for the Aspire release wave you are running
When it happens
Trigger: Installing a bundle whose supports.aspireCli range (e.g. '>=10.0.0 <11.0.0') does not contain the current CLI version; thrown from ValidateCompatibility via CreateBundle.
Common situations: Using a bundle published for a newer/older Aspire release than the installed CLI, running a pinned or preview CLI version, or after a downgrade of the CLI.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
- Aspire skills bundle supports Aspire SDK versions
- AppHost is incompatible with the CLI. The AppHost must be…
- Aspire skills bundle contains an empty version range.
- Aspire skills bundle contains an invalid version comparator
- Aspire skills bundle contains an invalid version value
AI-assisted analysis of microsoft/aspire@25830f84bd (2026-09-16).
Data as JSON: /api/errors/dbb452765c128541.
Report an issue: GitHub.
Appendix: source
Thrown at src/Aspire.Cli/Agents/AspireSkills/AspireSkillsBundleProvider.cs:640
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,
currentSdkVersion));
}
}
private static bool IsVersionInRange(string version, string range)View on GitHub (pinned to 25830f84bd)