{"record":{"id":"d20fbcc0bb1f7223","repo":"oraios/serena","slug":"dotnet-or-mono-not-found-on-the-system","errorCode":null,"errorMessage":"dotnet or mono not found on the system","messagePattern":"dotnet or mono not found on the system","errorType":"exception","errorClass":"SolidLSPException","httpStatus":null,"severity":"error","filePath":"src/solidlsp/ls_utils.py","lineNumber":788,"sourceCode":"                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:\n                return True\n            if SymbolUtils.symbol_tree_contains_name(symbol[\"children\"], name):\n                return True\n        return False\n","sourceCodeStart":770,"sourceCodeEnd":803,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/ls_utils.py#L770-L803","documentation":"Final fallback failure of get_dotnet_version: neither dotnet (not installed, or errored, or unsupported versions) nor mono (not installed or errored) could produce a usable .NET runtime. Thrown when setting up dependencies for language servers that require .NET (e.g. C#/OmniSharp).","triggerScenarios":"get_dotnet_version called via _setup_runtime_dependencies on a machine with neither dotnet nor mono on PATH, or where both fail to execute.","commonSituations":"Fresh CI containers or developer machines without any .NET; mono removed after migration to dotnet; PATH not containing the dotnet install dir in IDE-spawned shells.","solutions":["Install the .NET SDK or runtime (https://dot.net) and ensure `dotnet` is on PATH for the process launching this library","Alternatively install mono (`apt install mono-complete`) which the library accepts as a fallback","If dotnet is installed, verify it is reachable in the same environment (PATH, shell profile) that runs your editor/CI"],"exampleFix":"// before\n$ dotnet --version  # command not found\n// after\n$ curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 8.0\n$ export PATH=\"$PATH:$HOME/.dotnet\"","handlingStrategy":"validation","validationCode":"import shutil\nif not (shutil.which(\"dotnet\") or shutil.which(\"mono\")):\n    raise EnvironmentError(\"Install .NET SDK (https://dot.net) or mono before C# language-server setup\")","typeGuard":"def dotnet_or_mono_available() -> bool:\n    return shutil.which(\"dotnet\") is not None or shutil.which(\"mono\") is not None","tryCatchPattern":"try:\n    version = get_dotnet_version()\nexcept SolidLSPException as e:\n    if \"dotnet or mono not found\" in str(e):\n        raise MissingDependencyError(\"install dotnet SDK/runtime or mono\") from e\n    raise","preventionTips":["Install .NET SDK from dot.net as part of environment bootstrap","Ensure PATH for IDE/editor-spawned processes includes the dotnet install dir","In Docker, use mcr.microsoft.com/dotnet/sdk base images","Pre-check with `which dotnet mono` in setup scripts before enabling C# support"],"tags":["dotnet","mono","environment","dependency"],"backgroundTag":"dotnet-runtime-missing","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}