{"record":{"id":"450d334cf235b859","repo":"oraios/serena","slug":"dotnet-executable-not-found-at-dotnet-exe-after","errorCode":null,"errorMessage":"dotnet executable not found at {dotnet_exe} after installation","messagePattern":"dotnet executable not found at (.+?) after installation","errorType":"exception","errorClass":"SolidLSPException","httpStatus":null,"severity":"error","filePath":"src/serena/util/dotnet.py","lineNumber":146,"sourceCode":"                cmd = [\n                    \"bash\",\n                    str(script_path),\n                    \"--version\",\n                    version,\n                    \"--install-dir\",\n                    str(dotnet_dir),\n                    \"--runtime\",\n                    \"dotnet\",\n                    \"--no-path\",\n                ]\n\n            # Run the install script\n            log.info(\"Running .NET install script: %s\", cmd)\n            result = subprocess_run(cmd, capture_output=True, text=True, check=True)\n            log.debug(f\"Install script output: {result.stdout}\")\n\n            if not dotnet_exe.exists():\n                raise SolidLSPException(f\"dotnet executable not found at {dotnet_exe} after installation\")\n\n            log.info(f\"Successfully installed .NET {version} runtime to {dotnet_exe}\")\n            return str(dotnet_exe)\n\n        except subprocess.CalledProcessError as e:\n            raise SolidLSPException(f\"Failed to install .NET {version} runtime using install script: {e.stderr if e.stderr else e}\") from e\n        except Exception as e:\n            message = f\"Failed to install .NET {version} runtime: {e}\"\n            if is_windows and isinstance(e, FileNotFoundError):\n                message += \"; pwsh, i.e. PowerShell 7+, is required to install .NET runtime. Make sure pwsh is available on your system.\"\n            raise SolidLSPException(message) from e\n","sourceCodeStart":128,"sourceCodeEnd":158,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/serena/util/dotnet.py#L128-L158","documentation":"After running the official dotnet-install script, install_dotnet_with_script checks that the expected dotnet executable actually exists at the target path; if not it raises SolidLSPException. This catches silent script failures where the process exits 0 but nothing was installed.","triggerScenarios":"The install script completes without raising (exit 0) but the dotnet binary is not present at dotnet_exe — e.g. wrong architecture/channel download, install dir mismatch, script skipped download due to disk/network issues that still exit 0.","commonSituations":"Restricted filesystems or read-only install directories; proxy/CDN serving an error page saved where the binary should be; mismatched OS/arch parameter passed to the install script.","solutions":["Re-run the install with verbose logging and inspect the script's stdout for skipped-download reasons","Check free disk space and write permissions for the install directory","Manually download the runtime tarball/zip from Microsoft and extract dotnet to the expected path","Pin a known-good dotnet-install script version or set DOTNET_ROOT explicitly"],"exampleFix":"// before\ncmd = [install_script, '--channel', '8.0']\n// after\ncmd = [install_script, '--channel', '8.0', '--verbose']\n# then inspect stdout and verify: test -f \"$DOTNET_ROOT/dotnet\"","handlingStrategy":"validation","validationCode":"dotnet_exe = Path(install_dir) / \"dotnet\"\nresult = subprocess_run(cmd, capture_output=True, text=True)\nif not dotnet_exe.exists():\n    print(result.stdout, result.stderr)\n    raise RuntimeError(\"install script did not produce a dotnet binary\")","typeGuard":null,"tryCatchPattern":"try:\n    path = util.install_dotnet_with_script(version)\nexcept SolidLSPException as e:\n    log.error(\"dotnet install failed: %s\", e)\n    # fall back to manual install instructions","preventionTips":["Verify disk space and write permissions on the install dir before installing","Check install script stdout for silent skip reasons (wrong arch/OS flags)","Prefer pre-installing dotnet in the image over runtime downloads"],"tags":["dotnet","installation","environment"],"backgroundTag":"install-script-failed","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}