oraios/serena · critical · SolidLSPException
Required .NET runtime version {self._required_version_str} n
Error message
Required .NET runtime version {self._required_version_str} not found (installed versions: {self._installed_versions}). Please install the required .NET runtime version from https://dotnet.microsoft.com/en-us/download/dotnet and ensure that `dotnet` is on the system PATH. What it means
The DotnetUtil helper verifies that the required .NET runtime version is installed before handing out the dotnet executable path. If is_required_version_available() is False it raises SolidLSPException listing installed versions and pointing to the official download. This is used by language servers (e.g. C#/OmniSharp, Razor) that need dotnet to run.
Source
Thrown at src/serena/util/dotnet.py:66
"""
required_version_str = ".".join(str(c) for c in self._required_version_components)
for v in self._installed_versions:
if self._allow_higher_version:
if v.is_at_least(*self._required_version_components):
log.info(f"Found installed .NET runtime version {v} which satisfies requirement of {required_version_str} or higher")
return True
else:
if v.is_equal(*self._required_version_components):
log.info(f"Found installed .NET runtime version {v} which satisfies requirement of {required_version_str}")
return True
return False
def get_dotnet_path_or_raise(self) -> str:
"""
Returns the path to the dotnet executable if the required .NET runtime version is available, otherwise raises an exception.
"""
if not self.is_required_version_available():
raise SolidLSPException(
f"Required .NET runtime version {self._required_version_str} not found "
f"(installed versions: {self._installed_versions}). "
"Please install the required .NET runtime version from https://dotnet.microsoft.com/en-us/download/dotnet "
"and ensure that `dotnet` is on the system PATH."
)
assert self._system_dotnet is not None
return self._system_dotnet
@staticmethod
def install_dotnet_with_script(version: str, base_path: str) -> str:
"""
Install .NET runtime using Microsoft's official installation script.
NOTE: This method is unreliable and therefore currently unused. It is kept for reference.
:version: the version to install as a string (e.g. "10.0")
:return: the path to the dotnet executable.
"""View on GitHub (pinned to 7fcbca7e62)
Solutions
- Install the required .NET runtime from https://dotnet.microsoft.com/en-us/download/dotnet
- Ensure the dotnet executable is on the system PATH (verify with `dotnet --list-runtimes`)
- Install the exact version required (check _required_version_str, e.g. 6.0/8.0)
- Or set up dotnet via a package manager: apt/dnf/brew install dotnet-runtime-<version>
Example fix
// before dotnet --info # command not found // after sudo apt-get install -y dotnet-runtime-8.0 export PATH="$PATH:/usr/share/dotnet" dotnet --list-runtimes
Defensive patterns
Strategy: validation
Validate before calling
import shutil, subprocess
if shutil.which("dotnet") is None:
raise RuntimeError("dotnet not on PATH; install from https://dotnet.microsoft.com/en-us/download/dotnet")
subprocess.run(["dotnet", "--list-runtimes"], check=True, capture_output=True) Try / catch
try:
dotnet_path = DotnetUtil(...).get_dotnet_path_or_raise()
except SolidLSPException as e:
log.error("Install required .NET runtime: %s", e)
sys.exit(1) Prevention
- Pin the required .NET runtime version in CI images and dev setup docs
- Verify `dotnet --list-runtimes` contains the needed version before starting language servers
- Keep dotnet on PATH in containers/virtualenvs (set DOTNET_ROOT if needed)
When it happens
Trigger: Starting a language server whose _setup_runtime_dependencies calls _ensure_dotnet_runtime -> get_dotnet_path_or_raise when no dotnet is on PATH or the installed runtime is older/newer than the required version string.
Common situations: Fresh machines without .NET SDK/runtime; dotnet installed but not on PATH; wrong runtime channel (e.g. only ASP.NET Core runtime installed, missing base runtime); version pinned by the language server not present.
Related errors
- dotnet or mono not found on the system
- dotnet executable not found at {dotnet_exe} after installati
- Failed to install .NET {version} runtime: {e}
- Could not find 'uvx' or 'uv' in PATH. Install uv (https://do
- Failed to locate or download AL Language Server. Please eith
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/3e853b1663279d06.
Report an issue: GitHub.