vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

OmniSharp never loads in a remote SSH window

Open winstliu opened this issue 3 years ago • 7 comments

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. No OmniSharp log

C# log

Also completely blank. No C# log

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: ef40e6aa06

Runtime 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

winstliu avatar Apr 05 '22 18:04 winstliu

@50Wliu Are you opening an individual C# file or a folder containing a .csproj or .sln?

JoeRobich avatar Apr 05 '22 21:04 JoeRobich

Git repository containing a C# .sln at the root level.

winstliu avatar Apr 05 '22 22:04 winstliu

@50Wliu In the Log (Extension Host) log in the VS Code Output Pane, is there any errors or mention of csharp?

JoeRobich avatar Apr 08 '22 20:04 JoeRobich

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".

winstliu avatar Apr 12 '22 21:04 winstliu

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.

winstliu avatar Apr 13 '22 21:04 winstliu

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}

winstliu avatar Jun 06 '22 21:06 winstliu

I have made it work with intellisense. I need to disable modern dotnet. But then it seem it not report error in ssh windows

Thaina avatar Sep 30 '22 09:09 Thaina

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 /cloud is a symlink to /nas/cloud )

  • omnisharp intellisense working /nas/cloud/personal/projects/sample

devel0 avatar Jan 28 '23 00:01 devel0