VSCode + C# (OmiSharp) not showing any errors

Viewed 32697

I'm trying to find out why i'm not getting any help by omisharp in my visual studio code.

I've tried reinstalling both application and my extensions and i'm still having the problem.

Any ideas on what i might be missing? something I need to install?

// Alex

how it looks

11 Answers

OmniSharp works on the solution file. If the project is not added to a solution, then you will not see the errors.

Add project to the solution:

$ dotnet sln add SampleProject/SampleProject.csproj

Restart OmniSharp:

Press CTRL + SHIFT + P and select Omnisharp: Restart OmniSharp.

enter image description hereIt often happens because sometimes user by mistake disables the setting required for producing errors or problems. Just go to code > preferences > settings > Workspace settings and enable the required settings. It worked well for me, hope it does for you too.

I spent some time figuring this out. I tried uninstalling extensions, uninstalling vs code itself, removing all app data files etc. The only simple solution was to file\open folder and browse to one of the folders of code you were working with and from there recreate you work-space as before by adding additional folders if needed. Once I did this all intellisense and error detection came back including go to definition.

I solved my same problem clicking in the bottom right corner of VSCode, line sequence CRLF, changed to LF and then change again to CRLF.

After this, my problem was solved, but i need to make this every time a restart the computer.

I fixed myself! all I did was press F1 and open settings(JSON), then I wrote "omnisharp.autoStart": true, give it a lil bit of time to load everything and you are done! Well this worked for me idk about you, but try it!

If it helps! In my case I mistakenly disabled the ERROR SQUIGGLES, while writing C++ code.

enable_squiggles

You can enable them by navigating to FILE > PREFERENCES > SETTINGS.

Type squiggles (be accurate) and you will get that. Choose 'EnableIfIncludesResolve' or 'Enabled'. And

First of all, check the OmniSharp Log in VS Code.

I've got this error:

Found dotnet version 3.1.412. Minimum required version is 6.0.100

Reason: I used .NET 3.1 but the latest OmniSharp (C# v1.25) requires at minimum .NET version 6.0.

Solution: I downgraded OmniSharp to v1.22 and it worked.

just download asp.net core 6. Then everything will be fine. That what I did and it is working perfectly

Click Ctl + Shift + P and Type "OmniSharp: Restart OmniSharp"

it will restart the Omnisharp and show Intelesense and Errors.

Hope It helps

Related