0

Omnisharp is not able to autocomplete for any files in the same solution unless the referenced file is opened in a new buffer.

Notes: Running :LspInfo shows the correct root directory; Neovim version is 0.5

The error is The type or namespace name 'ClassName' could not be found (are you missing a using directive or an assembly reference?)

My neovim config files are https://github.com/SleepySwords/dotfiles/blob/master/nvim/init.vim

And my LSP config is https://github.com/SleepySwords/dotfiles/blob/master/nvim/lsp.lua

SleepySwords
  • 1
  • 1
  • 1

1 Answers1

0

I fixed this by creating a new project and copying over the source files. The old project was showing errors to do with being unable to find a project to restore:

C:\Program Files\dotnet\sdk\6.0.101\NuGet.targets(130,5): warning : Unable to find a project to restore!

I tried deleting the obj and build folders, runnning "dotnet" with "clean", "build" and "restore" and nothing worked. Not too sure what the error was or how it came about, but creating a new project "dotnet new console" and copying over my source files and running "dotnet build" seems to have fixed it.

Tom
  • 1
  • 1