-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Omnisharp Server fails to load project files #811
Comments
I don't know what this means. Can't you just let OmniSharp-vim install the server? |
When I did that the server would never even attempt to start. I'll try it again and see what the logs say |
It looks like the same issue as #803 which should be resolved, a server error which has been fixed. |
using net6 combined with the server that comes from a OmniSharp-vim install fixed it. Thanks! |
Cool, glad to hear! |
Edit: working around the install issue by running the powershell script directly in powershell has resolved it for me on Windows. And installing from Windows seems to have resolved it for WSL as well. Not sure how it knew which directory to use as WSL installed to omnisharp-rosly and windows to omnisharp-roslyn. @tonymishler What exact steps did you take to resolve this? I'm having the same issue in WSL but am unable to resolve even with the latest beta of OmniSharp. I tried installing in Windows to make sure WSL wasn't the problem but have the same issue. Though I didn't do a standard OmniSharpInstall as that errors out on me currently. |
I uninstalled the Mason install of the server and did a fresh install with packer of OmniSharp and it worked. Be aware that it will tell you a server isn't started if it can't detect a .sln file in your vim context. Make sure to start nvim in the directory that contains the .sln file. |
You don't need to start vim in a directory containing a .sln. We find the .sln by searching up the directory tree from a .cs file. You can have multiple solutions open simultaneously in a single vim session, but no server will be started until you open a .cs file. |
When the server is attempting to load projects they all fail on the same missing method
[fail]: OmniSharp.MSBuild.ProjectManager 27 Failed to load project file 'C:\Users\tonym\source\repos\ButlerTransportation\ImageRetrievalWeb\ImageRetrievalWeb.csproj'. 26 System.MissingMethodException: Method not found: 'System.ReadOnlySpan
1 Microsoft.IO.Path.GetFileName(System.ReadOnlySpan1<Char>)'. 25 at Microsoft.Build.Shared.FileMatcher.IsFileNameMatch(String path, String pattern)
I'm running on windows 11 using nvim.
I installed the the server using Mason
and the OmniSharp using Packer with the following configuration
use { "OmniSharp/omnisharp-vim", config = function() vim.g.OmniSharp_server_path = "C:\\Users\\tonym\\AppData\\Local\\omnisharp-vim\\omnisharp-roslyn\\OmniSharp.exe" vim.g.OmniSharp_server_stdio_quickload = 1 vim.g.OmniSharp_server_use_net6 = 1 end, }
The text was updated successfully, but these errors were encountered: