Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode + C# (OmiSharp) not showing any errors

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

like image 530
Herlin Avatar asked May 13 '17 19:05

Herlin


People also ask

Does VSCode support C?

C/C++ support for Visual Studio Code is provided by a Microsoft C/C++ extension to enable cross-platform C and C++ development on Windows, Linux, and macOS.

Can I compile C in Visual Studio?

The Visual Studio build tools include a C compiler that you can use to create everything from basic console programs to full Windows Desktop applications, mobile apps, and more.

Why C is not working in VS code?

Go to the menu Code > Preferences > Settings. In the User tab on the left panel, expand the Extensions section. Find and select Run Code Configuration. Find and check the box Run in Terminal.


1 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.

like image 159
Tonatio Avatar answered Oct 07 '22 11:10

Tonatio