vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

Intellisense not working. Not displaying errors, warnings, and stuff

Open lilrau opened this issue 3 years ago • 17 comments

Suddenly, my VSCode stopped flagging errors, warnings, and even auto-completing the text. The C# extension has a undetected error "Cannot read properties of undefined (reading '_vs_onAutoInsertProvider')".

The settings.json is already: "C_Cpp.errorSquiggles": "enabled".

Already uninstalled VSCode and all extensions, but did not work.

I'm sorry for any english errors.

image image

lilrau avatar Aug 04 '23 17:08 lilrau

Also experienced this. Rolled back to the previous version and it's working for now, so this seems to be tied to v2.0.320. Also, not sure if this works in other environments better, but for myself I'm using it through WSL with the Remote Development addon.

hanson-andrew avatar Aug 04 '23 17:08 hanson-andrew

I have issues with v2.0.320 too. Thank you, @hanson-andrew! I didn't know that one can install old extension versions... I am working with 1.26.0 now and auto-completion works again.

(I am using Ubuntu 23.04 and Visual Studio Code 1.81.0)

moosetraveller avatar Aug 04 '23 17:08 moosetraveller

I think these issues are related:

  • #6025
  • #6024
  • #6016

moosetraveller avatar Aug 04 '23 17:08 moosetraveller

@lilrau are you able to share your project? If you could also set the dotnet.server.trace setting to Trace and attach the C# output window logs here that would be super useful. Thanks!

dibarbet avatar Aug 04 '23 18:08 dibarbet

I had a similar problem, the extension wasn't showing me code hints. Now you need to have a .sln file on your workspace in order to activate the extension, don't forget to add your csproj to your sln file.

ricardomertens avatar Aug 04 '23 19:08 ricardomertens

@lilrau are you able to share your project? If you could also set the dotnet.server.trace setting to Trace and attach the C# output window logs here that would be super useful. Thanks!

Hey! It seems that the issue was with version 2.0.320 of the extension... When I rolled back to version 1.26.0, everything started working normally again. I found it strange that the C# extension caused the auto-completion of other languages (like JS) to stop working as well... Anyway, changing the version fixed my problems. Thank you for your attention anyway!

lilrau avatar Aug 04 '23 20:08 lilrau

Also experienced this with my Unity C# project. In my case I can see references but only local within the file, it doesn't seem like it loads project/solution at all. Also doesn't show any errors or anything. I didn't revert, instead I put in dotnet.server.useOmnisharp = true and it made it work but I hope it's not some deprecated feature because I need vscode to edit my C# unity scripts.

DemonikGH avatar Aug 05 '23 05:08 DemonikGH

I can't get trace logs just yet but did at least verify that the behavior hasn't changed in 2.0.328.

hanson-andrew avatar Aug 09 '23 00:08 hanson-andrew

I was able to get this working by realizing I was doing some things wrong. First, I only had the C# extension installed, I somehow missed the C# DevKit altogether. I removed my C# extension and then installed the C# DevKit. That prompted me to choose a SLN file (I had 2 and wasn't actually aware of that). Once I selected that, it took a minute to process but things are working much smoother.

hanson-andrew avatar Aug 11 '23 16:08 hanson-andrew

This issue also reproduce on latest versions of C# v2.0.413

LuckyKang79 avatar Aug 25 '23 06:08 LuckyKang79

Also experienced this issue. Rolling back C# extension to 1.26 will make the C# Devkit extension complain but the auto-complete suggestions work again.

(EDIT: while method and parameters / arguments are suggested correctly again, I do not get any suggestions for string interpolation.)

I'm also experiencing the issues with the analysers not doing anything https://github.com/dotnet/vscode-csharp/issues/6263.

C# output trace attached DotnetServerTrace.txt

Octanoz avatar Sep 09 '23 14:09 Octanoz

It still happens with 2.1.2 on Fedora 38 with Visual Studio Code 1.82.0 and .NET 7.

moosetraveller avatar Sep 11 '23 15:09 moosetraveller

Seems like the issue is resolved for me when I add a new console app to an existing folder using the command palette (.NET new project) instead of manually through the terminal.

Analysers and intellicode are working as expected again.

Octanoz avatar Sep 14 '23 20:09 Octanoz

Still the issue is ongoing I'm facing this issue after updating the vscode my setup is macos m1 Ventura 13.5.2 Intellisense not working. Not displaying errors, warnings, and stuff

Mubeyd avatar Sep 18 '23 08:09 Mubeyd

I also experienced this but when I installed c# dev kit and restarted language service, intellisense started working 🤷

bogdan-fortum avatar Sep 20 '23 19:09 bogdan-fortum

Similarly, what worked for me was disabling and then re-enabling the C# Dev Kit extension in vscode.

metaxasa avatar Nov 21 '23 10:11 metaxasa

My resolution of this issue was to install the pre-released version of C# 2.16.24 and C# Dev kit 1.3.6. and also install the correct SDK ARM64(Apple silicon).

iamade avatar Jan 29 '24 09:01 iamade