{"record":{"id":"016ad64077e67a19","repo":"oraios/serena","slug":"no-supported-dotnet-version-found-available-versi","errorCode":null,"errorMessage":"No supported dotnet version found. Available versions: {', '.join(available_version_cmd_output)}. Supported versions: 4, 6, 7, 8, 9","messagePattern":"No supported dotnet version found\\. Available versions: (.+?)\\. Supported versions: 4, 6, 7, 8, 9","errorType":"exception","errorClass":"SolidLSPException","httpStatus":null,"severity":"error","filePath":"src/solidlsp/ls_utils.py","lineNumber":780,"sourceCode":"\n            if not available_version_cmd_output:\n                raise SolidLSPException(\"dotnet not found on the system\")\n\n            # Check for supported versions in order of preference (latest first)\n            for version_cmd_output in available_version_cmd_output:\n                if version_cmd_output.startswith(\"9\"):\n                    return DotnetVersion.V9\n                if version_cmd_output.startswith(\"8\"):\n                    return DotnetVersion.V8\n                if version_cmd_output.startswith(\"7\"):\n                    return DotnetVersion.V7\n                if version_cmd_output.startswith(\"6\"):\n                    return DotnetVersion.V6\n                if version_cmd_output.startswith(\"4\"):\n                    return DotnetVersion.V4\n\n            # If no supported version found, raise exception with all available versions\n            raise SolidLSPException(\n                f\"No supported dotnet version found. Available versions: {', '.join(available_version_cmd_output)}. Supported versions: 4, 6, 7, 8, 9\"\n            )\n        except (FileNotFoundError, subprocess.CalledProcessError):\n            try:\n                result = subprocess_run([\"mono\", \"--version\"], capture_output=True, check=True)\n                return DotnetVersion.VMONO\n            except (FileNotFoundError, subprocess.CalledProcessError):\n                raise SolidLSPException(\"dotnet or mono not found on the system\")\n\n\nclass SymbolUtils:\n    @staticmethod\n    def symbol_tree_contains_name(roots: list[UnifiedSymbolInformation], name: str) -> bool:\n        \"\"\"\n        Check if any symbol in the tree has a name matching the given name.\n        \"\"\"\n        for symbol in roots:\n            if symbol[\"name\"] == name:","sourceCodeStart":762,"sourceCodeEnd":798,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/ls_utils.py#L762-L798","documentation":"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.","triggerScenarios":"`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.","commonSituations":"Machines pinned to EOL .NET Core 3.1; brand-new .NET major released before library support; preview-only runtimes installed.","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"],"exampleFix":"// before\n$ dotnet --list-runtimes  # only Microsoft.NETCore.App 10.x\n// after\n$ apt install dotnet-runtime-8.0","handlingStrategy":"validation","validationCode":"import subprocess\nout = subprocess.run([\"dotnet\", \"--list-runtimes\"], capture_output=True, text=True)\nmajors = {l.split()[1].split(\".\")[0] for l in out.stdout.splitlines() if l.startswith(\"Microsoft.NETCore.App\")}\nsupported = {\"4\",\"6\",\"7\",\"8\",\"9\"}\nif not majors & supported:\n    raise EnvironmentError(f\"dotnet majors {majors} unsupported; need one of {supported}\")","typeGuard":"def has_supported_dotnet() -> bool:\n    try:\n        out = subprocess.run([\"dotnet\",\"--list-runtimes\"], capture_output=True, text=True, check=True)\n    except (FileNotFoundError, subprocess.CalledProcessError):\n        return False\n    supported = {\"4\",\"6\",\"7\",\"8\",\"9\"}\n    return any(l.startswith(\"Microsoft.NETCore.App\") and l.split()[1].split(\".\")[0] in supported\n               for l in out.stdout.splitlines())","tryCatchPattern":"try:\n    version = get_dotnet_version()\nexcept SolidLSPException as e:\n    if \"No supported dotnet version\" in str(e):\n        install_side_by_side_runtime(\"8.0\")  # side-by-side, keeps existing runtimes\n    raise","preventionTips":["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"],"tags":["dotnet","environment","version"],"backgroundTag":"dotnet-version-unsupported","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}