3

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.

1
  • 1
    Open the output panel, select C# from the dropdown, check if there's any error. Commented Mar 22, 2024 at 10:19

2 Answers 2

3
  1. If you have installed C# Dev Kit (extension) by Microsoft, then uninstall it.

  2. Left click on C# (extension) by Microsoft and select settings. enter image description here

  3. Then type this on the search bar appearing on C# extension's settings.

    @ext:ms-dotnettools.csharp omnisharp Search bar

  4. Then select the following option. Use Omnisharp

  5. Now reload the window or reopen the VS Code if necessary.

Sign up to request clarification or add additional context in comments.

Comments

1

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

2 Comments

I have same issue. Switching the omnisharp above to ON did not solve my problem.
@MoteZart make sure you have opened a solution first. if you haven't opened a solution it won't work. i have updated the answer including a screenshot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.