DEV Community

Why isn't IntelliCode working for C# in VSCode?

Calin Baenen on January 19, 2021

VSCode's IntelliCode and/or CSharp extension does not work. I try to stop in the middle of writing something like Console. or System., and nothing ...
Collapse
 
matjones profile image
Mat Jones

The C# language server in VS Code is just kinda poopy. Try restarting OmniSharp via the command palette.

Collapse
 
_hs_ profile image
HS

Also VS is kinda bad in many ways as MS focuses on delivery so users can do the QA and report back. Don't be shy to report bugs. I got really angry with Azure and Windows but they fixed some bugs in short time

Collapse
 
calinbaenen profile image
Calin Baenen

I have reported.

Collapse
 
calinbaenen profile image
Calin Baenen

How do I do that?

Collapse
 
matjones profile image
Mat Jones

CMD/CTRL+Shift+P to bring up the command palette, then search for OmniSharp, one of the commands should be to restart it.

Thread Thread
 
calinbaenen profile image
Calin Baenen

It didn't work, sadly.
Anything else I can do (or worse case, any other IDEs I can use)?

Collapse
 
harryammon profile image
Harry Ammon

Have you checked that you have a .sln file that is aware of the.csproj you are working with? This has caught me out a couple of times

Collapse
 
calinbaenen profile image
Calin Baenen

Sorry, I don't fully understand. What's a sln file? Why does it need to know about my projwct? And how does that help VSC?

Collapse
 
harryammon profile image
Harry Ammon • Edited

Have you created a dotnet project for your C# file? My understanding is that omnisharp looks for a .sln file to decide what files that add intellisense to.

A .sln file is a dotnet file that references a .csproj files.

Thread Thread
 
calinbaenen profile image
Calin Baenen

I have, but it never generated thst file. And why would I have multiple CSPs?