Closed danrot closed 3 years ago
Can you share the code that reproduces this? There are unfortunately no obvious problems visible in the logs, other than the fact that the project failed to load.
thanks
I have zipped everything together (that's why it is so big, but I was afraid to remove stuff, since it might cause the error). Happens to more or less all of my projects... I create them using the dotnet
binary (dotnet new webapi
, dotnet add package ...
).
I just downloaded your solution and it works fine for me.
It had some errors related to Microsoft.CodeAnalysis.Analyzers 3.0.0
but after deleting the obj
and bin
folders, rebuilding with dotnet build
and restarting OmniSharp, everything loads fine.
Can you retry with these steps?
Just followed these steps, and it is still not working for me... What exactly have you tested? I have e.g. issues with the modelBuilder
in the example's CompanyContext
. Made a recording of the screen, to avoid any misunderstandings:
Note how it can complete the modelBuilder
variable, but it does not suggest anything for the modelBuilder
. As you can see in the recording the steps you have mentioned don't work either.
This is a server repo, so I only tested OmniSharp server - and it works fine in this case. I am not sure what the VIM extension does in this case, but looks like the problem is there then.
I have transferred it here because to me it looks like a problem with the VIM extension, not the server issue. @nickspoons is opening an individual file supposed to be supported? or are you supposed to start from sln/folder?
Ok, but just to be sure, how can I test if just the server is working on my machine?
And from my understanding I am opening the folder with the sln file, how else should I be handling this?
@nickspoons is opening an individual file supposed to be supported? or are you supposed to start from sln/folder?
@filipw Yes, this is how OmniSharp-vim works: you open a .cs file, and OmniSharp-vim looks in parent directories for the .sln or .csproj, and launches the server pointing at the .sln/.csproj.
In this case the solution is being found and started correctly, as can be seen from the 04_provide_rest.sln
displayed in the vim statusline in the demo, and the launch command at the start of the log: /Users/roda/.cache/omnisharp-vim/omnisharp-roslyn/run -s /Users/roda/Documents/Teaching/FTB-IDI-BB/anwendungsintegration-und-sicherheit/seminars/04-provide-rest/04-provide-rest.sln -l debug -e utf-8
Is there an easy way for me to test if the server itself is working? I.e. without the vim plugin?
Just by running /Users/roda/.cache/omnisharp-vim/omnisharp-roslyn/run -s /Users/roda/Documents/Teaching/FTB-IDI-BB/anwendungsintegration-und-sicherheit/seminars/04-provide-rest/04-provide-rest.sln -l debug -e utf-8
on the command line. But to test actual interaction, you need a client. Testing in vscode would be a useful comparison.
@filipw I don't think this is a client issue. I tried just starting the server from the command line and got the same errors as OP. I know you have been working on improvements to the handling of missing SDK/framework errors so I tried pulling the latest OmniSharp-roslyn from git and building (with the latest Visual Studio), and using that server, I can now run the project (on Windows)
I suspect the problem has to do with SDK/.NETFramework requirements, but I can't quite work it out.
Oh, I just realised that in the process of getting OmniSharp-roslyn to build, I had to install the v5.0.2 SDK and upgrade Visual Studio from 16.7 to 16.9. One of those has helped because I now can run the project with the latest OmniSharp-roslyn release (not just my build of the server).
After installing the latest dotnet SDK (v5.0.200) on archlinux with dotnet-install --install-dir /usr/share/dotnet -channel Current
using dotnet-install, I can now also run the project there.
I think that was indeed the issue... I've installed dotnet
using homebrew. I chose the dotnet
package, but that seems to be outdated... Installed the dotnet-sdk
package instead, and restarted the server using :OmniSharpRestartServer
once more, not it is working 🙂 Thanks for the help!
Hi there!
I have installed omnisharp-vim on Mac OSX in Neovim. The autocomplete feature only seems to work with the .NET framework itself, but I e.g. don't get any autocompletion for Microsoft Entity Framework Core classes. I've been hinted to have a look at the log using the
:OmniSharpOpenLog
command in vim, which result in this log (including debug messages).The two lines that especially got my attention are the following:
For some reason it seems the
csproj
file could not be loaded, so it in turn makes sense, that the auto completion for the added packages does not work. But I don't know why that does not work, the close lines in the log do not help me (but I don't know the project very well).I am also showing the csproj file here, maybe that gives some idea on what is going south: