{"record":{"id":"3624450f4669a7e9","repo":"microsoft/aspire","slug":"aspire-skills-bundle-supports-aspire-sdk-versions-0-but-the","errorCode":null,"errorMessage":"Aspire skills bundle supports Aspire SDK versions '{0}', but the current SDK version is '{1}'.","messagePattern":"Aspire skills bundle supports Aspire SDK versions '(.+?)', but the current SDK version is '(.+?)'\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Cli/Agents/AspireSkills/AspireSkillsBundleProvider.cs","lineNumber":650,"sourceCode":"\n        if (string.IsNullOrWhiteSpace(supports.AspireCli))\n        {\n            throw new InvalidOperationException(\"Aspire skills bundle manifest must specify supports.aspireCli.\");\n        }\n\n        if (!IsVersionInRange(currentCliVersion, supports.AspireCli))\n        {\n            throw new InvalidOperationException(string.Format(\n                CultureInfo.InvariantCulture,\n                \"Aspire skills bundle supports Aspire CLI versions '{0}', but the current CLI version is '{1}'.\",\n                supports.AspireCli,\n                currentCliVersion));\n        }\n\n        if (!string.IsNullOrWhiteSpace(supports.AspireSdk) &&\n            !IsVersionInRange(currentSdkVersion, supports.AspireSdk))\n        {\n            throw new InvalidOperationException(string.Format(\n                CultureInfo.InvariantCulture,\n                \"Aspire skills bundle supports Aspire SDK versions '{0}', but the current SDK version is '{1}'.\",\n                supports.AspireSdk,\n                currentSdkVersion));\n        }\n    }\n\n    private static bool IsVersionInRange(string version, string range)\n    {\n        var normalizedVersion = ParseCompatibilityVersion(version);\n        var comparators = range.Replace(',', ' ').Split(' ', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);\n        if (comparators.Length == 0)\n        {\n            throw new InvalidOperationException(\"Aspire skills bundle contains an empty version range.\");\n        }\n\n        foreach (var comparator in comparators)\n        {","sourceCodeStart":632,"sourceCodeEnd":668,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Cli/Agents/AspireSkills/AspireSkillsBundleProvider.cs#L632-L668","documentation":"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.","triggerScenarios":"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.","commonSituations":"global.json pinning an older SDK, machine upgraded to a newer SDK than the bundle allows, or bundle authored against a different SDK wave.","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"],"exampleFix":"// before\nglobal.json: \"sdk\": { \"version\": \"9.0.100\" }  // bundle requires >=10.0\n// after\n\"sdk\": { \"version\": \"10.0.100\" }","handlingStrategy":"validation","validationCode":"// confirm the SDK pinned for the app matches the bundle's declared range\ndotnet --version   // must fall within supports.aspireSdk if the manifest declares it","typeGuard":null,"tryCatchPattern":"try\n{\n    await installer.InstallAsync(bundleRef);\n}\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"supports Aspire SDK versions\"))\n{\n    logger.LogError(ex, \"SDK version outside the bundle's declared range — align global.json/SDK with the bundle.\");\n}","preventionTips":["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"],"tags":["cli","skills-bundle","sdk-version","compatibility"],"backgroundTag":"value-out-of-range","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-21T09:17:21.228Z"}