oraios/serena · error · SolidLSPException
No supported dotnet version found. Available versions: {', '
Error message
No supported dotnet version found. Available versions: {', '.join(available_version_cmd_output)}. Supported versions: 4, 6, 7, 8, 9 What it means
Raised by get_dotnet_version when dotnet is present and reports runtimes, but none start with a supported major version (4, 6, 7, 8, 9). The message lists all detected runtime versions so you can see what is installed.
Source
Thrown at src/solidlsp/ls_utils.py:780
if not available_version_cmd_output:
raise SolidLSPException("dotnet not found on the system")
# Check for supported versions in order of preference (latest first)
for version_cmd_output in available_version_cmd_output:
if version_cmd_output.startswith("9"):
return DotnetVersion.V9
if version_cmd_output.startswith("8"):
return DotnetVersion.V8
if version_cmd_output.startswith("7"):
return DotnetVersion.V7
if version_cmd_output.startswith("6"):
return DotnetVersion.V6
if version_cmd_output.startswith("4"):
return DotnetVersion.V4
# If no supported version found, raise exception with all available versions
raise SolidLSPException(
f"No supported dotnet version found. Available versions: {', '.join(available_version_cmd_output)}. Supported versions: 4, 6, 7, 8, 9"
)
except (FileNotFoundError, subprocess.CalledProcessError):
try:
result = subprocess_run(["mono", "--version"], capture_output=True, check=True)
return DotnetVersion.VMONO
except (FileNotFoundError, subprocess.CalledProcessError):
raise SolidLSPException("dotnet or mono not found on the system")
class SymbolUtils:
@staticmethod
def symbol_tree_contains_name(roots: list[UnifiedSymbolInformation], name: str) -> bool:
"""
Check if any symbol in the tree has a name matching the given name.
"""
for symbol in roots:
if symbol["name"] == name:View on GitHub (pinned to 7fcbca7e62)
Solutions
- Install a supported runtime, e.g. `dotnet-runtime-8` alongside existing ones (side-by-side is safe)
- If a new major (e.g. 10) is installed, additionally install a supported LTS version
- Update the library to a version supporting your .NET major
Example fix
// before $ dotnet --list-runtimes # only Microsoft.NETCore.App 10.x // after $ apt install dotnet-runtime-8.0
Defensive patterns
Strategy: validation
Validate before calling
import subprocess
out = subprocess.run(["dotnet", "--list-runtimes"], capture_output=True, text=True)
majors = {l.split()[1].split(".")[0] for l in out.stdout.splitlines() if l.startswith("Microsoft.NETCore.App")}
supported = {"4","6","7","8","9"}
if not majors & supported:
raise EnvironmentError(f"dotnet majors {majors} unsupported; need one of {supported}") Type guard
def has_supported_dotnet() -> bool:
try:
out = subprocess.run(["dotnet","--list-runtimes"], capture_output=True, text=True, check=True)
except (FileNotFoundError, subprocess.CalledProcessError):
return False
supported = {"4","6","7","8","9"}
return any(l.startswith("Microsoft.NETCore.App") and l.split()[1].split(".")[0] in supported
for l in out.stdout.splitlines()) Try / catch
try:
version = get_dotnet_version()
except SolidLSPException as e:
if "No supported dotnet version" in str(e):
install_side_by_side_runtime("8.0") # side-by-side, keeps existing runtimes
raise Prevention
- Install a supported LTS runtime (8.0) even if a newer major exists — they install side-by-side
- Avoid CI images with only EOL (2.1/3.1) or preview-only runtimes
- Update the library when new .NET majors are needed
- Pin the dotnet runtime version in CI/dockerfiles
When it happens
Trigger: `dotnet --list-runtimes` returns Microsoft.NETCore.App entries only for unsupported majors, e.g. only version 10 (preview/newer) or 2.1/3.1 (EOL) installed.
Common situations: Machines pinned to EOL .NET Core 3.1; brand-new .NET major released before library support; preview-only runtimes installed.
Related errors
- Required .NET runtime version {self._required_version_str} n
- dotnet executable not found at {dotnet_exe} after installati
- Failed to install .NET {version} runtime: {e}
- dotnet not found on the system
- dotnet or mono not found on the system
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/016ad64077e67a19.
Report an issue: GitHub.