Intellisense not working at all ...
See original GitHub issueEnvironment data
.NET Core SDK (reflecting any global.json): Version: 2.1.402 Commit: 3599f217f4
Runtime Environment: OS Name: Windows OS Version: 10.0.17134 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.1.402\
Host (useful for support): Version: 2.1.4 Commit: 85255dde3e
.NET Core SDKs installed: 2.1.300 [C:\Program Files\dotnet\sdk] 2.1.402 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
VS Code version: 1.27.2
C# Extension version: 1.16.1
Steps to reproduce
I opened a C# sharp file on a ASP.NET Core project.
I reinstalled Visual Studio Code and Omisharp as well as ASP.NET Core runtimes and SDK and I keep having the same problem. Problems with Intellisense not working has been something very common …
Expected behavior
Intellisense to display options after typing a dot …
Actual behavior
Intellisense is not working … No options are displayed.
Exception
I checked the developer console and get the following:
[Extension Host] [ms-vscode.csharp] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '[csharp]', provide the URI of a resource or 'null' for any resource.
[Extension Host] rejected promise not handled within 1 second
ERR Pending request cancelled: /codecheck: Error: Pending request cancelled: /codecheck
at RequestQueue.cancelRequest (C:\Users\Mig\.vscode\extensions\ms-vscode.csharp-1.16.1\out\src\omnisharp\requestQueue.js:45:29)
at RequestQueueCollection.cancelRequest (C:\Users\Mig\.vscode\extensions\ms-vscode.csharp-1.16.1\out\src\omnisharp\requestQueue.js:115:15)
at token.onCancellationRequested (C:\Users\Mig\.vscode\extensions\ms-vscode.csharp-1.16.1\out\src\omnisharp\server.js:394:40)
at e.fire (c:\Users\Mig\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:99:917)
at e.cancel (c:\Users\Mig\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:106:130)
at e.cancel (c:\Users\Mig\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:106:854)
at DiagnosticsProvider._validateDocument (C:\Users\Mig\.vscode\extensions\ms-vscode.csharp-1.16.1\out\src\features\diagnosticsProvider.js:161:44)
at DiagnosticsProvider._onDocumentAddOrChange (C:\Users\Mig\.vscode\extensions\ms-vscode.csharp-1.16.1\out\src\features\diagnosticsProvider.js:136:18)
at DiagnosticsProvider.vscode.workspace.onDidChangeTextDocument.event (C:\Users\Mig\.vscode\extensions\ms-vscode.csharp-1.16.1\out\src\features\diagnosticsProvider.js:110:73)
at e.fire (c:\Users\Mig\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:99:937)
at e.$acceptModelChanged (c:\Users\Mig\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:742:362)
at e._doInvokeHandler (c:\Users\Mig\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:681:309)
at e._invokeHandler (c:\Users\Mig\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:681:27)
at e._receiveRequest (c:\Users\Mig\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:679:802)
at e._receiveOneMessage (c:\Users\Mig\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:678:993)
at c:\Users\Mig\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:677:791
at c:\Users\Mig\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:98:597
at e.fire (c:\Users\Mig\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:99:917)
at a (c:\Users\Mig\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:164:787)
at Socket._socketDataListener (c:\Users\Mig\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:164:1006)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at Socket.Readable.push (_stream_readable.js:208:10)
at Pipe.onread (net.js:594:20)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:22 (8 by maintainers)
Top GitHub Comments
@mdmoura I think I understand what might be happening. OmniSharp is loading only the API project, hence you are getting complete intellisense support for that project, and for the files in other projects you are getting only basic support(which doesnot look into the project definition). Can you try “OmniSharp --> Select Project”, you should see a drop down with all the project names, and selecting a project would make the intellisense work for it.
We are tracking work related to adding Multi-Root Workspace support here: https://github.com/OmniSharp/omnisharp-vscode/issues/1889.
@mdmoura If you load a solution that contains all the projects, then intellisense will work for all if them, however omnisharp currently doesnt support loading multiple projects in a multi-root workspace.