microsoft/aspire · error · InvalidOperationException
Helm CLI not found or could not be invoked. Aspire requires…
Error message
Helm CLI not found or could not be invoked. Aspire requires Helm 4.2.0 or later. Install it from https://helm.sh/docs/intro/install/ and ensure it is available on your PATH.
What it means
HelmVersionValidator.EnsureMinimumVersionAsync wraps any exception thrown while trying to spawn the 'helm' process into this InvalidOperationException. The raw underlying error (e.g. 'No such file or directory', 'permission denied') is unhelpful, so Aspire replaces it with an actionable message stating Helm 4.2.0+ must be installed and on PATH. The original exception is preserved as InnerException.
Solutions
- Install Helm (>= 4.2.0) following https://helm.sh/docs/intro/install/ and reopen the shell so PATH updates apply.
- Verify with 'helm version --short' in the same shell/environment that runs the Aspire deploy; if it fails there, fix PATH or the binary's execute permission first.
- If Helm is installed but not found by the process, prepend its directory to PATH for the Aspire process (e.g. set PATH in the launch profile, CI step, or container image).
- Check the InnerException to distinguish permission-denied (chmod +x the helm binary) from not-found (PATH issue).
Example fix
// before dotnet run --project MyApp.AppHost // fails: helm not on PATH in this session // after (bash) export PATH="$PATH:/usr/local/bin" && helm version --short && dotnet run --project MyApp.AppHost
Defensive patterns
Strategy: validation
Validate before calling
// Run before deploying:
var psi = new System.Diagnostics.ProcessStartInfo("helm", "version --short")
{
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false
};
try
{
using var p = System.Diagnostics.Process.Start(psi)!;
await p.WaitForExitAsync();
Console.WriteLine($"helm found: {p.StandardOutput.ReadToEnd().Trim()}");
}
catch (Exception)
{
throw new InvalidOperationException("helm is not installed or not on PATH; install Helm >= 4.2.0 (https://helm.sh/docs/intro/install/).");
} Try / catch
try
{
await publishPipeline;
}
catch (InvalidOperationException ex) when (ex.Message.StartsWith("Helm CLI not found"))
{
Console.Error.WriteLine($"{ex.Message}\nInner: {ex.InnerException?.Message}");
// route to install docs / fail the CI step with a clear setup error
} Prevention
- Install Helm in your dev container/CI image as a setup step before running the AppHost deploy.
- Verify 'helm version --short' works in the exact environment (same user, same shell, same container) that runs the deploy.
- After installing Helm on Windows, restart the terminal/IDE so PATH changes propagate.
- Check execute permissions when manually downloading the helm binary (chmod +x).
When it happens
Trigger: Any deploy of Kubernetes resources via the Helm deployment engine when the 'helm' executable cannot be spawned: not installed, not on PATH, permission denied on the binary, or the process runner throws for any non-cancellation reason.
Common situations: Helm never installed on a CI agent or devcontainer; helm installed via a version manager (asdf, mise) whose PATH isn't loaded in the deploy process; exec bit missing after a manual download; Windows PATH not refreshed after installing Helm; using 'helm.exe' under WSL or vice versa.
Related errors
- Azure CLI (az) not found. Install it from…
- Could not parse Helm version from 'helm version --short'…
- 'helm version --short' failed
- Aspire skills bundle contains an empty relative path.
- AzureCliNotOnPathException (Azure CLI is not on PATH)
AI-assisted analysis of microsoft/aspire@25830f84bd (2026-09-16).
Data as JSON: /api/errors/f422029e679af98c.
Report an issue: GitHub.
Appendix: source
Thrown at src/Aspire.Hosting.Kubernetes/Deployment/HelmVersionValidator.cs:80
var stdout = new StringBuilder();
var stderr = new StringBuilder();
int exitCode;
try
{
exitCode = await helmRunner.RunAsync(
"version --short",
onOutputData: line => stdout.AppendLine(line),
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}.");
}View on GitHub (pinned to 25830f84bd)