{"record":{"id":"7da77bc12d3fbf2f","repo":"oraios/serena","slug":"failed-to-install-net-version-runtime-using-ins","errorCode":null,"errorMessage":"Failed to install .NET {version} runtime using install script: {e.stderr if e.stderr else e}","messagePattern":"Failed to install \\.NET (.+?) runtime using install script: (.+?)","errorType":"exception","errorClass":"SolidLSPException","httpStatus":null,"severity":"error","filePath":"src/serena/util/dotnet.py","lineNumber":152,"sourceCode":"                    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":134,"sourceCodeEnd":158,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/serena/util/dotnet.py#L134-L158","documentation":"If the dotnet install script subprocess exits non-zero (subprocess.CalledProcessError), install_dotnet_with_script wraps it in SolidLSPException including stderr. This means the download or extraction step of the .NET runtime failed.","triggerScenarios":"dotnet-install.sh/dotnet-install.ps1 returning a non-zero exit code — download URLs unreachable (404/offline), TLS failures, unsupported OS/arch combination, or pwsh script errors.","commonSituations":"Corporate proxies blocking downloads; no internet access in CI; Microsoft CDN outage; unsupported Linux distro for the install script.","solutions":["Read the stderr in the exception for the root cause and fix accordingly (URL, proxy, disk)","Check network connectivity/proxy settings (HTTPS_PROXY) and retry","Install the .NET runtime manually via system package manager instead of the script","On Windows, ensure pwsh (PowerShell 7+) is installed since the script requires it"],"exampleFix":"// before\ncurl -sSL https://dot.net/v1/dotnet-install.sh | bash  # blocked by proxy\n// after\nexport HTTPS_PROXY=http://proxy.corp:8080\nwget https://dot.net/v1/dotnet-install.sh && bash dotnet-install.sh --channel 8.0","handlingStrategy":"retry","validationCode":"import urllib.request\nurllib.request.urlopen(\"https://builds.dotnet.microsoft.com\", timeout=10)  # connectivity check","typeGuard":null,"tryCatchPattern":"try:\n    path = util.install_dotnet_with_script(version)\nexcept SolidLSPException as e:\n    if \"install script\" in str(e):\n        print(\"Check network/proxy; stderr:\", e)\n    raise","preventionTips":["Configure HTTPS_PROXY in environments behind corporate proxies","Retry transient download failures with backoff","Install the runtime via the system package manager when the network is restricted"],"tags":["dotnet","installation","network","subprocess"],"backgroundTag":"install-script-failed","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}