OmniSharp / omnisharp-roslyn

OmniSharp server (HTTP, STDIO) based on Roslyn workspaces
MIT License
1.79k stars 420 forks source link

Paths translation between Windows and Linux (WSL2) #2504

Open darkdread opened 1 year ago

darkdread commented 1 year ago

I am trying to get omnisharp-roslyn in Linux to work with .csproj generated in Windows, but the paths are not interchangeable.

I see omnisharp-vim has an option which uses omnisharp-roslyn built in Windows for WSL, and they translate the paths back and forth between the server and the client. However, If possible, I would like to use nvim-lspconfig to handle this behavior. Can anyone point me in the right direction on how to get started? Thanks!

reaz1995 commented 1 year ago

@darkdread Some time passed, did you figure out any workaround?

art3xias23 commented 9 months ago

Hey @darkdread, did you have any luck with this.

Ref to your other post on neovim.discourse

darkdread commented 9 months ago

Hey @reaz1995 , @art3xias23 , no luck with this. Best workaround I found is to create a simple script that transforms all paths to WSL, and you have to do this for each solution file generated. Cumbersome, but works nonetheless.

art3xias23 commented 9 months ago

In my case I'm on windows 10 with debian instance of wsl2.

My .csproj was generated and built in windows with the dotnet cli tools installed on the windows path. That's when I found my issue. I had also alias'd dotnet.exe and nuget.exe to dotnet and nuget respectively to their windows paths.

However, once i installed the dotnet and nuget cli tools via apt I was able to build my .csprojs via the wsl paths and everything was well, didn't have to transform any paths.