Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C# Intellisense not starting #3885

Closed
EthanVanderHorn opened this issue Jun 30, 2020 · 3 comments
Closed

C# Intellisense not starting #3885

EthanVanderHorn opened this issue Jun 30, 2020 · 3 comments

Comments

@EthanVanderHorn
Copy link

EthanVanderHorn commented Jun 30, 2020

Issue Description

C# Intellisense not working. All of the C#, .NET, and Omnisharp logs are empty, and the Omnisharp icon not showing in the status bar.

Same problem as 3640
I tried uninstalling all extensions other than C#. I tried reinstalling VSCode entirely. I tried some of the fixes from the other task.

The reason I am reopening this issue is that I can replicate the problem even when not interfacing with Unity at all. Which means that the "Resolved-External" tag seems misplaced. Additionally the folder section of the explorer is not empty as another user experienced.

Steps to Reproduce

  1. Launch VS code
  2. Install the C# Extension by Microsoft
  3. Close and reopen VS Code
  4. Open a .cs file
  5. C#, Omnisharp, and .NET logs will all be empty. No Intellisense, and Omnisharp not starting

Expected Behavior

Omnisharp starting, and C# Intellisense working normally

Actual Behavior

Omnisharp not starting, C# Intellisense not working

Logs

Completely Empty

OmniSharp log

Completely Empty

C# log

Completely Empty

Environment information

VSCode version: 1.46.1
C# Extension: 1.22.1

Dotnet Information .NET Core SDK (reflecting any global.json): Version: 3.1.201 Commit: b1768b4ae7

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

Host (useful for support):
Version: 3.1.3
Commit: 4a9f85e9f8

.NET Core SDKs installed:
2.1.401 [C:\Program Files\dotnet\sdk]
3.1.201 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions
Extension Author Version
autoimport steoates 1.5.3
biosyntax reageyao 0.0.9
Bookmarks alefragnani 11.3.1
cif thisperiodictable 0.2.1
csharp ms-dotnettools 1.22.1
gitlens eamodio 10.2.2
imagepreview buzzfrog 0.5.1
Lua keyring 0.0.9
MagicPython magicstack 1.1.0
partial-diff ryu1kn 1.4.1
prettier-vscode esbenp 5.1.1
python ms-python 2020.6.90262
python-extension-pack donjayamanne 1.6.0
remote-wsl ms-vscode-remote 0.44.4
unity-debug Unity 2.7.5
vscode-autohotkey slevesque 0.2.2
vscode-django batisteo 0.20.0
vscode-gutter-preview kisstkondoros 0.26.2
vscode-nuget-package-manager jmrog 1.1.6
vscode-peacock johnpapa 3.7.2
vscodeintellicode VisualStudioExptTeam 1.2.9
vsliveshare ms-vsliveshare 1.0.2377
vsliveshare-pack ms-vsliveshare 0.4.0
xml DotJoshJohnson 2.5.0
@JoeRobich
Copy link
Member

Hi @EthanVanderHorn,

I reproduced the issue of OmniSharp not activating when a single .cs file is open. In part it is related to #1592 because the '**/*.cs' is not part of the workspace contains check.

At the moment opening a plain .cs file does not provide enough information to provide intellisense. It has no record of nuget package references, framework references, or project references. This information is all stored in the project file.

We recommend opening a folder that directly or recursively contains the solution or project file your .cs file is a part of.

We will likely revisit the single file experience as top-level statement makes its way into C#.

-Joey

@hanhsia
Copy link

hanhsia commented Apr 12, 2021

I also can't trigger OmniSharp if I open a workspace which contains multiple projects. In this case. C# extension is never loaded. But when i open a specific folder in side the worksapce, it works fine. So does it mean C# extension can't support workspace?

@JoeRobich
Copy link
Member

@hanhsia VS Code workspaces are currently not well supported. See #1889

@JoeRobich JoeRobich closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants