microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
228 stars 12 forks source link

C# Dev Kit not working as expected #1497

Open Hjesse23 opened 2 weeks ago

Hjesse23 commented 2 weeks ago

Describe the Issue

I get the following error: Microsoft.CodeAnalysis.LanguageServer client: couldn't create connection to server. Source C#

One thing I noticed besides the error is that the IntelliSense doesn't seem to work. It doesn't show the red or yellow lines when I make a mistake in my code.

Screenshot 2024-09-28 134954

Steps To Reproduce

I connect to Visual Studio Code via WSL remote connection and the error message seems to appear after a minute or two.

Expected Behavior

I expect the IntelliSense to work for C# development in Visual Studio Code.

Environment Information

WSL version: 2.2.4.0 Kernel version: 5.15.153.1-2 WSLg version: 1.0.61 MSRDC version: 1.2.5326 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26091.1-240325-1447.ge-release Windows version: 10.0.22631.4169

Distributor ID: Ubuntu Description: Ubuntu 24.04.1 LTS Release: 24.04 Codename: noble

aaronlee916 commented 1 week ago

I'm having the same issue image

dibarbet commented 1 week ago

@Hjesse23 could you collect the C# logs as described here and attach them to the issue? https://github.com/dotnet/vscode-csharp/blob/main/SUPPORT.md#collecting-general-logs

JoeRobich commented 1 week ago

@aaronlee916 It looks like you may be trying to edit a loose C# file that isn't part of a project or solution. This scenario isn't well supported at the moment, but it is on our backlog as https://github.com/dotnet/vscode-csharp/issues/5729.