vscode-csharp
vscode-csharp copied to clipboard
OmniSharp never loads in a remote SSH window
Issue Description
I'm trying to work on a C# solution using Remote SSH. Unfortunately, OmniSharp never seems to load.
Steps to Reproduce
Use VS Code's Remote SSH capabilities to SSH into a Windows machine. useModernNet is true.
Expected Behavior
OmniSharp to load.
Actual Behavior
No logs. Nothing! :(
OmniSharp: Restart OmniSharp doesn't seem to have any effect.
I see the OmniSharp 1.38.2-net6.0 server downloaded at ~\.vscode-server\extensions\ms-dotnettools.csharp-1.24.3\.omnisharp.
Logs
OmniSharp log
Literally blank.

C# log
Also completely blank.

Environment information
VSCode version: 1.66.0 C# Extension: 1.24.3
Dotnet Information
.NET SDK (reflecting any global.json): Version: 6.0.201 Commit: ef40e6aa06Runtime Environment: OS Name: Windows OS Version: 10.0.19043 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\6.0.201\
Host (useful for support): Version: 6.0.3 Commit: c24d9a9c91
.NET SDKs installed: 6.0.201 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions
| Extension | Author | Version |
|---|---|---|
| azure-account | ms-vscode | 0.10.1 |
| azure-pipelines | ms-azure-devops | 1.202.0 |
| csharp | ms-dotnettools | 1.24.3 |
| powershell | ms-vscode | 2021.12.0 |
| vscode-bicep | ms-azuretools | 0.4.1318 |
| vscode-dotnet-runtime | ms-dotnettools | 1.5.0 |
@50Wliu Are you opening an individual C# file or a folder containing a .csproj or .sln?
Git repository containing a C# .sln at the root level.
@50Wliu In the Log (Extension Host) log in the VS Code Output Pane, is there any errors or mention of csharp?
Nothing in Log (Extension Host).
But in Log (Remote Extension Host), I have:
[2022-04-12 21:10:57.391] [exthost] [info] ExtensionService#_doActivateExtension ms-dotnettools.csharp, startup: false, activationEvent: 'onLanguage:csharp'
Most OmniSharp/.NET commands error with "OmniSharp server is not running".
Today I see this in the C# log (still nothing in OmniSharp):
Installing C# dependencies...
Platform: win32, x86_64
Downloading package 'OmniSharp for Windows (.NET 6 / x64)' (39624 KB).................... Done!
Validating download...
Integrity Check succeeded.
Installing package 'OmniSharp for Windows (.NET 6 / x64)'
Finished
Lemme try RDPing to the machine and seeing if it'll start up if I run VS Code visually on the remote.
Remoting in worked fine.
Now I see this in the extension host log:
[2022-06-03 12:47:06.340] [exthost] [info] Not activating extension 'ms-dotnettools.csharp': Timed out while searching for 'workspaceContains' pattern **/*.{csproj,sln,slnf,csx,cake}
I have made it work with intellisense. I need to disable modern dotnet. But then it seem it not report error in ssh windows
I got the same problem, solved by opening FULL PATH of the project folder ( ie. cd somepath, then use pwd to show full path ).
In my case following happens using C-K-O ( open folder ):
-
omnisharp intellisense not working
/cloud/personal/projects/sample( having that/cloudis a symlink to/nas/cloud) -
omnisharp intellisense working
/nas/cloud/personal/projects/sample