{"record":{"id":"3e853b1663279d06","repo":"oraios/serena","slug":"required-net-runtime-version-self-required-vers","errorCode":null,"errorMessage":"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.","messagePattern":"Required \\.NET runtime version (.+?) not found \\(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\\.","errorType":"exception","errorClass":"SolidLSPException","httpStatus":null,"severity":"critical","filePath":"src/serena/util/dotnet.py","lineNumber":66,"sourceCode":"        \"\"\"\n        required_version_str = \".\".join(str(c) for c in self._required_version_components)\n        for v in self._installed_versions:\n            if self._allow_higher_version:\n                if v.is_at_least(*self._required_version_components):\n                    log.info(f\"Found installed .NET runtime version {v} which satisfies requirement of {required_version_str} or higher\")\n                    return True\n            else:\n                if v.is_equal(*self._required_version_components):\n                    log.info(f\"Found installed .NET runtime version {v} which satisfies requirement of {required_version_str}\")\n                    return True\n        return False\n\n    def get_dotnet_path_or_raise(self) -> str:\n        \"\"\"\n        Returns the path to the dotnet executable if the required .NET runtime version is available, otherwise raises an exception.\n        \"\"\"\n        if not self.is_required_version_available():\n            raise SolidLSPException(\n                f\"Required .NET runtime version {self._required_version_str} not found \"\n                f\"(installed versions: {self._installed_versions}). \"\n                \"Please install the required .NET runtime version from https://dotnet.microsoft.com/en-us/download/dotnet \"\n                \"and ensure that `dotnet` is on the system PATH.\"\n            )\n        assert self._system_dotnet is not None\n        return self._system_dotnet\n\n    @staticmethod\n    def install_dotnet_with_script(version: str, base_path: str) -> str:\n        \"\"\"\n        Install .NET runtime using Microsoft's official installation script.\n\n        NOTE: This method is unreliable and therefore currently unused. It is kept for reference.\n\n        :version: the version to install as a string (e.g. \"10.0\")\n        :return: the path to the dotnet executable.\n        \"\"\"","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/serena/util/dotnet.py#L48-L84","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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>"],"exampleFix":"// before\ndotnet --info  # command not found\n// after\nsudo apt-get install -y dotnet-runtime-8.0\nexport PATH=\"$PATH:/usr/share/dotnet\"\ndotnet --list-runtimes","handlingStrategy":"validation","validationCode":"import shutil, subprocess\nif shutil.which(\"dotnet\") is None:\n    raise RuntimeError(\"dotnet not on PATH; install from https://dotnet.microsoft.com/en-us/download/dotnet\")\nsubprocess.run([\"dotnet\", \"--list-runtimes\"], check=True, capture_output=True)","typeGuard":null,"tryCatchPattern":"try:\n    dotnet_path = DotnetUtil(...).get_dotnet_path_or_raise()\nexcept SolidLSPException as e:\n    log.error(\"Install required .NET runtime: %s\", e)\n    sys.exit(1)","preventionTips":["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)"],"tags":["dotnet","environment","dependency","language-server"],"backgroundTag":"missing-runtime-dependency","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}