microsoft/aspire · error · InvalidOperationException
'helm version --short' failed
Error message
'helm version --short' failed ({detail}). Aspire requires Helm 4.2.0 or later. See https://helm.sh/docs/intro/install/. What it means
Thrown when the 'helm version --short' process runs but exits with a nonzero exit code. The validator includes stderr text (or the exit code when stderr is empty) as the {detail} placeholder so the underlying Helm failure is visible in the message. This means Helm was found and launched, but the version query itself failed.
Solutions
- Run 'helm version --short' manually; the printed error text is embedded in this exception's message, so fix whatever it reports.
- Reinstall Helm 4.2.0+ from https://helm.sh/docs/intro/install/ if the binary is corrupt or too old to support 'version --short'.
- Clear or fix HELM_* environment variables (HELM_NAMESPACE, HELM_DRIVER, plugin paths) that could make helm abort before printing its version.
Example fix
// before $ helm version --short Error: unknown flag: --short (helm 2.x) // after $ brew upgrade helm # or reinstall from https://helm.sh/docs/intro/install/ $ helm version --short v4.2.0+...
Defensive patterns
Strategy: validation
Validate before calling
// Pre-check that 'helm version --short' exits 0:
var output = await System.Diagnostics.ProcessExtensions.RunAsync("helm", "version --short");
if (output?.ExitCode != 0)
{
Console.Error.WriteLine($"helm version check failed: {output?.StandardError?.Trim()} - reinstall Helm >= 4.2.0");
} Try / catch
try
{
await deployAsync();
}
catch (InvalidOperationException ex) when (ex.Message.StartsWith("'helm version --short' failed"))
{
// The failed stderr detail is embedded between parentheses in the message.
Console.Error.WriteLine($"Helm is installed but broken: {ex.Message}");
} Prevention
- Run 'helm version --short' manually when this fires - its stderr is reproduced in the exception message.
- Reinstall Helm cleanly rather than upgrading in place when the binary behaves oddly.
- Avoid HELM_* env overrides (HELM_DRIVER, HELM_NAMESPACE, plugin dirs) in deploy environments unless tested.
- Pin Helm in CI images to a known-good 4.2.0+ version.
When it happens
Trigger: Running EnsureMinimumVersionAsync (via the Kubernetes Helm deploy pipeline) where 'helm version --short' returns a nonzero exit code - e.g. corrupt/old helm binary, broken KUBECONFIG-independent helm plugins misbehaving at startup, or an unreadable HELM_* environment setting causing helm to abort.
Common situations: A broken or partially upgraded helm installation that crashes on startup; helm wrapper scripts that print errors and exit nonzero; enterprise security software blocking execution after spawn; a pinned ancient helm version that no longer supports --short.
Related errors
- Could not parse Helm version from 'helm version --short'…
- Helm was detected, but Aspire requires Helm or later to…
- Helm CLI not found or could not be invoked. Aspire requires…
- Cannot derive a Helm release name from resource name
- Cannot derive a Kubernetes namespace from resource name
AI-assisted analysis of microsoft/aspire@25830f84bd (2026-09-16).
Data as JSON: /api/errors/30955875bcf54de1.
Report an issue: GitHub.
Appendix: source
Thrown at src/Aspire.Hosting.Kubernetes/Deployment/HelmVersionValidator.cs:89
onErrorData: line => stderr.AppendLine(line),
cancellationToken: cancellationToken).ConfigureAwait(false);
}
catch (Exception ex) when (ex is not OperationCanceledException)
{
// ProcessUtil throws when the process itself can't be spawned (helm not on
// PATH, permission denied, etc.). The exception message from the runner
// is typically a low-level "No such file or directory" or
// "permission denied" that doesn't tell users what to do, so wrap it.
throw new InvalidOperationException(
$"Helm CLI not found or could not be invoked. Aspire requires Helm {MinimumHelmVersion} or later. Install it from {InstallDocsUrl} and ensure it is available on your PATH.",
ex);
}
if (exitCode != 0)
{
var errorText = stderr.ToString().Trim();
var detail = string.IsNullOrEmpty(errorText) ? $"exit code {exitCode}" : errorText;
throw new InvalidOperationException(
$"'helm version --short' failed ({detail}). Aspire requires Helm {MinimumHelmVersion} or later. See {InstallDocsUrl}.");
}
var rawOutput = stdout.ToString().Trim();
if (!TryParseHelmVersion(rawOutput, out var detected))
{
throw new InvalidOperationException(
$"Could not parse Helm version from 'helm version --short' output: '{rawOutput}'. Aspire requires Helm {MinimumHelmVersion} or later. See {InstallDocsUrl}.");
}
if (detected < MinimumHelmVersion)
{
throw new InvalidOperationException(
string.Format(
CultureInfo.InvariantCulture,
"Helm {0} was detected, but Aspire requires Helm {1} or later to deploy Kubernetes resources. Upgrade Helm from {2}.",
detected,
MinimumHelmVersion,View on GitHub (pinned to 25830f84bd)