microsoft/aspire · error · InvalidOperationException
Helm was detected, but Aspire requires Helm or later to…
Error message
Helm {0} was detected, but Aspire requires Helm {1} or later to deploy Kubernetes resources. Upgrade Helm from {2}. What it means
Thrown when Helm is found and its version parses successfully, but the detected version is older than Aspire's minimum (4.2.0). The message formats detected version, required minimum, and the install-docs URL. Deployment cannot proceed because Aspire's Helm templating/destroy flows rely on Helm 4.x behavior.
Solutions
- Upgrade Helm to 4.2.0 or later from https://helm.sh/docs/intro/install/ (replace the binary or use your package manager: 'brew upgrade helm', 'choco upgrade kubernetes-helm', etc.).
- Verify the upgrade with 'helm version --short' showing v4.2.0+ before rerunning the deploy.
- Remove stale helm3 packages ('apt remove helm3' / old 'helm' from distro repos) that shadow the newer binary on PATH.
Example fix
// before $ helm version --short v3.14.0+... // after $ brew upgrade helm $ helm version --short v4.2.0+...
Defensive patterns
Strategy: validation
Validate before calling
// Check the version before deploying:
var raw = await CaptureAsync("helm version --short");
var m = System.Text.RegularExpressions.Regex.Match(raw, @"v?(\d+)\.(\d+)\.(\d+)");
if (m.Success && new Version(int.Parse(m.Groups[1].Value), int.Parse(m.Groups[2].Value), int.Parse(m.Groups[3].Value)) < new Version(4, 2, 0))
{
Console.Error.WriteLine("Helm >= 4.2.0 is required: https://helm.sh/docs/intro/install/");
} Try / catch
try
{
await deployAsync();
}
catch (InvalidOperationException ex) when (ex.Message.StartsWith("Helm ") && ex.Message.Contains("was detected, but Aspire requires"))
{
// Message contains detected version, required version, and upgrade URL.
Console.Error.WriteLine(ex.Message);
} Prevention
- Upgrade Helm to 4.2.0+ before adopting Aspire Kubernetes publishing.
- Remove distro 'helm3'/legacy helm packages that shadow newer installs on PATH.
- Pin helm >= 4.2.0 in CI images and devcontainer features.
- Add a version check to your CI setup step so staleness fails early with a clear message.
When it happens
Trigger: EnsureMinimumVersionAsync parses 'helm version --short' output into a Version and compares detected < MinimumHelmVersion (4.2.0); any helm 3.x or helm 4.0/4.1 install triggers this when deploying Kubernetes resources through the Helm deployment engine.
Common situations: Distros/CI images pinning helm 3.x via apt (helm3 packages); developers who installed helm long ago and never upgraded; using a package-manager version lagging upstream; projects recently migrated to Aspire's Kubernetes publishing that requires Helm 4.2+.
Related errors
- Could not parse Helm version from 'helm version --short'…
- 'helm version --short' failed
- Cannot derive a Helm release name from resource name
- Cannot derive a Kubernetes namespace from resource name
- Chart description must be a string or a parameter resource…
AI-assisted analysis of microsoft/aspire@25830f84bd (2026-09-16).
Data as JSON: /api/errors/e8f40ff3f5563b7f.
Report an issue: GitHub.
Appendix: source
Thrown at src/Aspire.Hosting.Kubernetes/Deployment/HelmVersionValidator.cs:102
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,
InstallDocsUrl));
}
}
/// <summary>
/// Extracts the first <c>MAJOR.MINOR.PATCH</c> token from the given Helm version
/// output. Returns <see langword="false"/> if no version token is present.
/// </summary>
internal static bool TryParseHelmVersion(string output, out Version version)
{
version = new Version(0, 0, 0);
if (string.IsNullOrWhiteSpace(output))
{View on GitHub (pinned to 25830f84bd)