DEV Community

Calin Baenen
Calin Baenen

Posted on

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

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 comes up. It works for literally every other language except C#.

What's happening, and how can I fix it?

Thanks!
Cheers!

Top comments (19)

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
 
baenencalin profile image
Calin Baenen

I have reported.

Collapse
 
baenencalin 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
 
baenencalin profile image
Calin Baenen

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

Thread Thread
 
matjones profile image
Mat Jones

If you have a student (.edu) email address, you can get JetBrains Rider for free, that IDE is really incredible, everything just works amazingly right out of the box.

Thread Thread
 
baenencalin profile image
Calin Baenen

I don't, sadly. And I can't really shell out money, since I have no online currency buffer, nor do I have money to spend.

Any free IDEs I could use?

Thread Thread
 
matjones profile image
Mat Jones

Only free option I know of is Visual Studio. Be warned, though, while it works and will give you IntelliSense, I personally find it really difficult to find things in the UI, I find it to be pretty slow, and I find the default keyboard shortcut mappings to be garbage.

Thread Thread
 
baenencalin profile image
Calin Baenen

So, does this mean I'm (almost) shit out of luck here?

Thread Thread
 
matjones profile image
Mat Jones

Until the Language Server implementation for C# gets better, unfortunately I think so. Visual Studio works okay, I just personally dislike it.

Thread Thread
 
baenencalin profile image
Calin Baenen

Okay. I'll try to do some looking myself. But thank you for your help.

Thread Thread
 
Sloan, the sloth mascot
Comment deleted
 
matjones profile image
Mat Jones

He’s asking about VS Code, not Visual Studio.

Thread Thread
 
mileswatson profile image
Miles Watson

Oh, my bad.

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
 
baenencalin 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
 
baenencalin profile image
Calin Baenen

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