What is expected by the client for workspace/_roslyn_projectNeedsRestore
?
#79924
-
Hi, I am the maintainer of https://github.com/seblyng/roslyn.nvim which configures the roslyn language server to work in neovim. I am wondering a bit about what is expected by the client to be done for Trying to look at how vscode has implemented this: https://github.com/dotnet/vscode-csharp/blob/main/src/lsptoolshost/projectRestore/restore.ts#L40-L61 it seems like it should be relatively straight forward. It basically just sends it straight back to Trying to do something similary in neovim doesn't seem to work as I would expect however. For context, I am testing this with the csharpier repo: https://github.com/belav/csharpier, and opening this file The handler is correctly triggered, and the result I get from the roslyn server is this:
already here I feel like I am misunderstanding something. The usage of Maybe it is just me misinterpreting things, but then I try to send a request to
which seems to be the same thing that vscode does. However, then I get this response back:
which is weird because the .csproj file it tried to locate does obviously not exist. Here is some (maybe) relevant discussions: seblyng/roslyn.nvim#233 (comment) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
If your client receives a message like This is some wonkiness related to file-based apps. Basically the way our project system works is we see the |
Beta Was this translation helpful? Give feedback.
There should be no need to interpret the paths the server is asking you to restore. You should be able to take each entry in
projectFilePaths
and pass it straight through todotnet restore
. No need to check if a similarly named.csproj
exists or things like that.We do also have an issue where, if the solution is not yet loaded (i.e. the initial loading process is ongoing), we are "over-eager" in treating
.cs
files as if they are file-based apps. That's something I am meaning to address later on when possible. But once the language server has loaded the solution/projects it should not be asking you to restore.cs
files that are part of a project.