How can I make OmniSharp VSCode intellisense work with compiled WSL code?

When I run dotnet build in my code from my WSL distribution (Windows subsystem for Linux), C # intellisense breaks and I get errors like the following:

enter image description here

I managed to customize the launch configuration found here , but this does not help with Intellisense unless I missed something.

I assume it has something to do with path configurations, but I'm not sure what to change, or where I should change it.

In short, how can I compile and run my code in WSL and edit it in VS Code without errors or warnings?

+5
source share
1 answer

There are more possible solutions:


Incorrect structure of your folder:

  • Use a terminal in VSCode and create a folder like mkdir MyProject
  • Create your project in a new folder from the terminal, for example: dotnet new console

Incorrect settings:

Switch to:

 Code -> Preferences -> Settings 

and delete "omnisharp.useMono": true/false

Alternatively, you can open the project using Visual Studio or MonoDevelop, and then open it again in VSCode.


You have invalid input parameters in TryParseExact #LAUGHING

+1
source

Source: https://habr.com/ru/post/1273051/


All Articles