OmniSharp / omnisharp-vim

Vim omnicompletion (intellisense) and more for C#
http://www.omnisharp.net
MIT License
1.7k stars 169 forks source link

Won't load on OmniSharp > 1.38.x #810

Closed ghost closed 2 years ago

ghost commented 2 years ago

Sorry to leave the "MSBuild instance not found" error again, and I have no idea where to put this issue. It is related to the version of OmniSharp, no doubt, but I don't know that it's specifically a bug in Omnisharp either.

Running on Ubuntu 22.04 Running Vim 8.2 using Vundle.vim

I have worked around the issue by downgrading to OmniSharp v1.38.1. I'd be happy to help discover where this bug belongs if you let me know what I can provide you.

nickspoons commented 2 years ago

What type of project is it? net6.0? Do you have any OmniSharp-vim settings in your .vimrc?

nickspoons commented 2 years ago

Try applying the suggestion here, to use the net6 version of the server: https://github.com/OmniSharp/omnisharp-vim/issues/805#issuecomment-1235791042

ghost commented 2 years ago

I am using the following .vimrc:

filetype off

let g:ale_linters = { \ 'cs': ['OmniSharp'] \ }

let g:Omnisharp_selector_ui = 'fzf' let g:Omnisharp_selector_findusages = 'fzf' let g:Omnisharp_server_use_net6 = 1 let g:Omnisharp_loglevel = 'debug' set rtp+=~/.vim/bundle/Vundle.vim

call vundle#begin()

Plugin 'VundleVim/Vundle.vim' Plugin 'omnisharp/omnisharp-vim' Plugin 'tpope/vim-fugitive' Plugin 'nathanaelkane/vim-indent-guides' Plugin 'tpope/vim-surround' Plugin 'scrooloose/nerdtree' Plugin 'airblade/vim-gitgutter' Plugin 'vim-airline/vim-airline' Plugin 'prabirshrestha/asyncomplete.vim' Plugin 'junegunn/fzf' Plugin 'dense-analysis/ale' Plugin 'morhetz/gruvbox'

call vundle#end() filetype plugin indent on

In any case, it should be relatively easy to reproduce and judging by my web searches, it has been:

  1. Install Ubuntu 22.04
  2. Install vim
  3. Install OmniSharp >=1.39.0 using the vimrc above
  4. Crash

Regards,

Brian Richardson Enterprise Architect @.***


From: Nick Jensen @.> Sent: Friday, September 30, 2022 1:31:39 AM To: OmniSharp/omnisharp-vim @.> Cc: Brian Richardson @.>; Author @.> Subject: Re: [OmniSharp/omnisharp-vim] Won't load on OmniSharp > 1.38.x (Issue #810)

Try applying the suggestion here, to use the net6 version of the server: #805 (comment)https://github.com/OmniSharp/omnisharp-vim/issues/805#issuecomment-1235791042

— Reply to this email directly, view it on GitHubhttps://github.com/OmniSharp/omnisharp-vim/issues/810#issuecomment-1263212748, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADGOVSWXFQUBQE4ILOTWUV3WA2JNXANCNFSM6AAAAAAQZNEBB4. You are receiving this because you authored the thread.Message ID: @.***>

nickspoons commented 2 years ago

What type of project is it? Do you have a repro project to test with?

nickspoons commented 2 years ago

A log would be helpful. :OmniSharpOpenLog

ghost commented 2 years ago

You can reproduce on a clean install of Ubuntu 22.04 with the distro's dotnet6 package, using the vimrc I provided, on the repository https://github.com/cubikca/RabbitWarren.

This is the log output when trying to load that project using OmniSharp 1.39.1:

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 13 2022 09:35:02), Included patches: 1-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919 OmniSharp server started. Path: @./.cache/omnisharp-vim/omnisharp-roslyn/run Target: @./RabbitWarren/RabbitWarren.sln PID: 139966 [info]: OmniSharp.Stdio.Host Starting OmniSharp on ubuntu 22.4 (x64) [info]: OmniSharp.Services.DotNetCliService Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK [info]: OmniSharp.Services.DotNetCliService Using the 'dotnet' on the PATH. [info]: OmniSharp.Services.DotNetCliService DotNetPath set to dotnet [info]: OmniSharp.MSBuild.Discovery.MSBuildLocator Located 0 MSBuild instance(s)


From: Nick Jensen @.> Sent: Friday, September 30, 2022 3:03:22 AM To: OmniSharp/omnisharp-vim @.> Cc: Brian Richardson @.>; Author @.> Subject: Re: [OmniSharp/omnisharp-vim] Won't load on OmniSharp > 1.38.x (Issue #810)

What type of project is it? Do you have a repro project to test with?

— Reply to this email directly, view it on GitHubhttps://github.com/OmniSharp/omnisharp-vim/issues/810#issuecomment-1263309000, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADGOVSQI4LTQKM5AY4VDDDLWA2UFVANCNFSM6AAAAAAQZNEBB4. You are receiving this because you authored the thread.Message ID: @.***>

nickspoons commented 2 years ago

Ah

I have been trying to understand what's happening here because your log looks like it's not in net6 mode, when it clicked: It's not. Your OmniSharp-vim settings all use lowercase "s", g:Omnisharp_... instead of g:OmniSharp...

So make sure your setting names are correct, restart vim, reinstall the server (:OmniSharpInstall) and see how you get on. Your log should be running an executable called OmniSharp, not the run script, e.g.:

    Path: /home/nickspoon/.cache/omnisharp-vim/omnisharp-roslyn/OmniSharp
ghost commented 1 year ago

Yep, it's a typo. Thanks for the help. It is working now on the latest version.

Brian Richardson Enterprise Architect @.***


From: Nick Jensen @.> Sent: Friday, September 30, 2022 3:45:25 AM To: OmniSharp/omnisharp-vim @.> Cc: Brian Richardson @.>; Author @.> Subject: Re: [OmniSharp/omnisharp-vim] Won't load on OmniSharp > 1.38.x (Issue #810)

Ah

I have been trying to understand what's happening here because your log looks like it's not in net6 mode, which it clicked: It's not. Your OmniSharp-vim settings all use lowercase "s", g:Omnisharp_... instead of g:OmniSharp...

So make sure your setting names are correct, restart vim, reinstall the server (:OmniSharpInstall) and see how you get on. Your log should be running an executable called OmniSharp, not the run script, e.g.:

Path: /home/nickspoon/.cache/omnisharp-vim/omnisharp-roslyn/OmniSharp

— Reply to this email directly, view it on GitHubhttps://github.com/OmniSharp/omnisharp-vim/issues/810#issuecomment-1263351683, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADGOVSTMIB3LYCUN3SEDLT3WA2ZDLANCNFSM6AAAAAAQZNEBB4. You are receiving this because you authored the thread.Message ID: @.***>