{"record":{"id":"27844a4d65935f48","repo":"microsoft/aspire","slug":"aspire-extension-is-incompatible-with-the-cli-the-extension","errorCode":null,"errorMessage":"Aspire Extension is incompatible with the CLI. The Extension must be updated to a version that supports the {0} capability.","messagePattern":"Aspire Extension is incompatible with the CLI\\. The Extension must be updated to a version that supports the (.+?) capability\\.","errorType":"exception","errorClass":"ExtensionIncompatibleException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Cli/Backchannel/ExtensionBackchannel.cs","lineNumber":312,"sourceCode":"                static void AddLocalRpcTarget(JsonRpc rpc, IExtensionRpcTarget target)\n                {\n                    // We don't want to notify the client of events because we are not using the\n                    // event system in the extension.\n                    rpc.AddLocalRpcTarget(target, new JsonRpcTargetOptions() { NotifyClientOfEvents = false });\n                }\n\n                var rpc = new JsonRpc(new HeaderDelimitedMessageHandler(stream, stream, BackchannelJsonSerializerContext.CreateRpcMessageFormatter()));\n                AddLocalRpcTarget(rpc, _target);\n                rpc.StartListening();\n\n                var capabilities = await rpc.InvokeWithCancellationAsync<string[]>(\n                    \"getCapabilities\",\n                    [_token],\n                    cancellationToken);\n\n                if (!capabilities.Any(s => s == KnownCapabilities.Baseline))\n                {\n                    throw new ExtensionIncompatibleException(\n                        string.Format(CultureInfo.CurrentCulture, ErrorStrings.ExtensionIncompatibleWithCli,\n                            KnownCapabilities.Baseline),\n                        KnownCapabilities.Baseline\n                    );\n                }\n\n                _rpcTaskCompletionSource.SetResult(rpc);\n            }\n            catch (RemoteMethodNotFoundException ex)\n            {\n                _logger.LogError(ex,\n                    \"Failed to connect to {Name} backchannel. The connection must be updated to a version that supports the {BaselineCapability} capability.\",\n                    Name,\n                    KnownCapabilities.Baseline);\n\n                throw new ExtensionIncompatibleException(\n                    string.Format(CultureInfo.CurrentCulture, ErrorStrings.ExtensionIncompatibleWithCli,\n                        KnownCapabilities.Baseline),","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Cli/Backchannel/ExtensionBackchannel.cs#L294-L330","documentation":"During ConnectAsync the CLI calls the extension's 'getCapabilities' RPC (passing the auth token). If the returned capability list does not include the 'Baseline' capability, the extension is too old to work with this CLI, and an ExtensionIncompatibleException is thrown telling the user to update the extension to a version supporting the Baseline capability.","triggerScenarios":"Connecting to an Aspire VS Code extension whose getCapabilities response lacks KnownCapabilities.Baseline — i.e., an outdated extension matched with a newer CLI.","commonSituations":"User upgraded the Aspire CLI (dotnet tool update / new daily channel) but the VS Code extension remained on an older release, or a pinned/stale extension build is cached in VS Code.","solutions":["Update the Aspire VS Code extension to the latest version in VS Code (Extensions panel → Update / Reload).","Verify the extension and CLI versions align (aspire --version vs. the installed extension version) and update the CLI if it is intentionally older.","Fully reload/restart VS Code after updating so the extension process (and its backchannel endpoint) is replaced."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await backchannel.ConnectAsync(endpoint, ct); }\ncatch (ExtensionIncompatibleException ex)\n{ Console.Error.WriteLine($\"Update the Aspire VS Code extension: {ex.Message}\"); }","preventionTips":["Keep the Aspire CLI and VS Code extension versions in sync; update both together.","Check the extension's reported capabilities/version before connecting when possible.","Reload VS Code after CLI upgrades so the extension process is fresh."],"tags":["version-compatibility","extension","capabilities","cli"],"backgroundTag":"version-incompatibility","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"}