mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 00:16:57 +00:00
CSharpLanguageServer: Make clear that pwsh is required
This commit is contained in:
1 parent
c8d35d8d5f
commit
3791c1b050
2 files changed
+8
-2
No files matched your search
@@ -30,7 +30,7 @@ Some languages require additional installations or setup steps, as noted.
|
||||
* **AL**
|
||||
* **Bash**
|
||||
* **C#**
|
||||
(by default, uses the Roslyn language server (language `csharp`);
|
||||
(by default, uses the Roslyn language server (language `csharp`), requires `pwsh` ([PowerShell 7+](https://learn.microsoft.com/en-us/powershell/scripting/install/install-powershell-on-windows?view=powershell-7.5)) on Windows;
|
||||
set language to `csharp_omnisharp` to use OmiSharp instead)
|
||||
* **C/C++**
|
||||
(by default, uses the clangd language server (language `cpp`) but we also support ccls (language `cpp_ccls`);
|
||||
|
||||
@@ -536,6 +536,7 @@ class CSharpLanguageServer(SolidLanguageServer):
|
||||
]
|
||||
|
||||
# Run the install script
|
||||
log.info("Running .NET install script: %s", cmd)
|
||||
result = subprocess.run(cmd, capture_output=True, text=True, check=True)
|
||||
log.debug(f"Install script output: {result.stdout}")
|
||||
|
||||
@@ -550,7 +551,12 @@ class CSharpLanguageServer(SolidLanguageServer):
|
||||
f"Failed to install .NET {version} runtime using install script: {e.stderr if e.stderr else e}"
|
||||
) from e
|
||||
except Exception as e:
|
||||
raise SolidLSPException(f"Failed to install .NET {version} runtime: {e}") from e
|
||||
message = f"Failed to install .NET {version} runtime: {e}"
|
||||
if is_windows and isinstance(e, FileNotFoundError):
|
||||
message += (
|
||||
"; pwsh, i.e. PowerShell 7+, is required to install .NET runtime. Make sure pwsh is available on your system."
|
||||
)
|
||||
raise SolidLSPException(message) from e
|
||||
|
||||
def _get_initialize_params(self) -> InitializeParams:
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user