microsoft/aspire · error · InvalidOperationException
Aspire skills bundle supports Aspire SDK versions
Error message
Aspire skills bundle supports Aspire SDK versions '{0}', but the current SDK version is '{1}'. What it means
If the manifest optionally declares supports.aspireSdk and the current Aspire SDK version is outside that range, ValidateCompatibility throws this error naming both versions. Unlike aspireCli, the SDK range is only enforced when present and non-empty.
Solutions
- Update the installed Aspire/.NET SDK (or the SDK pinned in global.json) into the declared supports.aspireSdk range
- Install a bundle whose aspireSdk range covers your SDK
- Remove or widen the incorrect aspireSdk range in the manifest and republish
Example fix
// before
global.json: "sdk": { "version": "9.0.100" } // bundle requires >=10.0
// after
"sdk": { "version": "10.0.100" } Defensive patterns
Strategy: validation
Validate before calling
// confirm the SDK pinned for the app matches the bundle's declared range dotnet --version // must fall within supports.aspireSdk if the manifest declares it
Try / catch
try
{
await installer.InstallAsync(bundleRef);
}
catch (InvalidOperationException ex) when (ex.Message.Contains("supports Aspire SDK versions"))
{
logger.LogError(ex, "SDK version outside the bundle's declared range — align global.json/SDK with the bundle.");
} Prevention
- Keep global.json SDK pins in sync with the Aspire SDK wave you target
- Read the bundle's supports.aspireSdk range before installing on machines with pinned SDKs
- Plan SDK upgrades before adopting newer skills bundles
When it happens
Trigger: Installing a bundle with a non-empty supports.aspireSdk range that does not match the installed .NET/Aspire SDK version; thrown from ValidateCompatibility via CreateBundle.
Common situations: global.json pinning an older SDK, machine upgraded to a newer SDK than the bundle allows, or bundle authored against a different SDK wave.
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 CLI 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/3624450f4669a7e9.
Report an issue: GitHub.
Appendix: source
Thrown at src/Aspire.Cli/Agents/AspireSkills/AspireSkillsBundleProvider.cs:650
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)
{
var normalizedVersion = ParseCompatibilityVersion(version);
var comparators = range.Replace(',', ' ').Split(' ', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
if (comparators.Length == 0)
{
throw new InvalidOperationException("Aspire skills bundle contains an empty version range.");
}
foreach (var comparator in comparators)
{View on GitHub (pinned to 25830f84bd)