Search code examples
c#.netvisual-studio-codewindows-subsystem-for-linuxomnisharp

How do I activate the C# Omnisharp server in VSCode for .NET development? Currently, in VSCode for C#, IntelliSense isn't working


I started working on a .NET project in VSCode from WSL, and I have installed all the necessary extensions, including C# and the C# development kit. However, in my .NET code, I'm not seeing any IntelliSense, and I also cannot navigate to the implementation of functions using F12. Furthermore, when I search for Omnisharp in the VSCode command palette, it doesn't appear. I feel completely in the dark.


Solution

  • I have found a solution to my problem. This occurred because the new version of the C# extension has disabled the OmniSharp server by default. Therefore, we need to manually enable it. enter image description here

    Then, search for Omnisharp and enable "Use Omnisharp," and my problem is solved. (Credit to : https://www.youtube.com/watch?v=dvRAT2H0emQ )

    enter image description here

    Make sure you have opened the solution from the Solution Explorer . if not it won't work. enter image description here

    enter image description here