dotnet / dotnet/vscode-csharp

Project information is lost after language server restart with C# devkit

Open
#5,882 7 comments 10 reactions 1 assignee Claimed by @dibarbet View on GitHub
Bug
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
17h 56m
Merged PRs (30d)
21

Description

When using C# devkit, invoking the command '.NET Restart Language Server' will cause the project information to get lost.

### Details
When the C# extension's server restarts, it is able to reconnect to the brokered service bridge created by devkit. However on the devkit side, the project system doesn't realize that we've restarted and that it needs to re-send all the project information.

One potential fix here is for devkit to listen to the availability changed event of the C# project brokered service. When it detects that the service disappears, then comes back it would know we've lost the project info and that it needs to re-send.

Alternatively we could add some other channel to let devkit know that we need new project information.

### Workaround
When using devkit, don't use the '.NET Restart Language Server' command, instead use `Reload Window` to cause both devkit and the C# extension to restart.

cc @tmeschter

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.