dotnet/vscode-csharp

intellisense not work

allnnde opened this issue · 15 comments

Environment data

SDK de .NET Core (reflejando cualquier global.json):
Version: 2.1.301
Commit: 59524873d6

Entorno de tiempo de ejecución:
OS Name: Windows
OS Version: 10.0.17134
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.301\

Host (useful for support):
Version: 2.1.1
Commit: 6985b9f684

VS Code version:
1.25.0

C# Extension version:
1.15.2

the intellisense not work in code web api
when i try to restar onmisharp see "command 'o.restart' not found"

@allnnde Could you share your OmniSharp log ?( View --> Output --> OmniSharp Log)

i'm not have any log for Omnisharp

@allnnde Can you share your C# extension log?

@rchande

i'm having the same issue (no intellisense) with version 1.15.2.
No output for c# or omnisharp.
I opened the developer tools and found this:

[Extension Host] Activating extension 'ms-vscode.csharp' failed: Cannot find module 'rxjs/Subscription'.

@juwens Can you share your environment data (similar to @allnnde )

@rchande

PS C:\WINDOWS\system32> node --version
v10.4.1
PS C:\WINDOWS\system32> npm --version
5.6.0

PS C:\> dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.1.300
 Commit:    adab45bf0c

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.16299
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.300\

Host (useful for support):
  Version: 2.1.0
  Commit:  caa7b7e2ba

.NET Core SDKs installed:
  2.0.0 [C:\Program Files\dotnet\sdk]
  2.1.4 [C:\Program Files\dotnet\sdk]
  2.1.100 [C:\Program Files\dotnet\sdk]
  2.1.101 [C:\Program Files\dotnet\sdk]
  2.1.202 [C:\Program Files\dotnet\sdk]
  2.1.300 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

@juwens Thanks. I just installed the extension on a clean machine and wasn't able to reproduce that. Can you try deleting "%userprofile%.vscode\extensions\ms-vscode.csharp-1.15.2" and reinstalling?

@rchande i tried that previously without success

But i found the source of the problem on my computer.

Apparently my (installed) npm 5.6.0 is not compatible with node 10.4.1.
So i updated it to 6.1.0.

Now omnisharp and intellisense work fine again.

PS C:\Users\juwens> npm install -g npm
npm WARN npm npm does not support Node.js v10.4.1
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/

C:\Users\juwens\AppData\Roaming\npm\npm -> C:\Users\juwens\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
C:\Users\juwens\AppData\Roaming\npm\npx -> C:\Users\juwens\AppData\Roaming\npm\node_modules\npm\bin\npx-cli.js
+ npm@6.1.0
added 247 packages, removed 41 packages and updated 129 packages in 31.402s

@rchande As I said before, I do not have any log, sorry for my english

@allnnde
please try the following:

Help > Toggle Developer Tools
In Developer Tools go to Console and look for errors.

@juwens Interesting. npm isn't a requirement to use VS Code, but I guess it must try to use your local copy if you have one installed?

I deleted in %userprofile% the folders .onmishap and .vscode\extensions\ms-vscode.csharp-1.15.2 and reinstall and now it is working ok

@allnnde Thanks for following up--glad you got it working!

Thanks @allnnde your workround was wonderful . I found two folders vscode\extensions\ms-vscode.csharp-1.16.2 and vscode\extensions\ms-vscode.csharp-1.16.1 .

Uninstalled extension closed vs code , deleted these two folders and reinstalled .

Everything worked .

Even the intellisence which was not working started working.