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

IntelliSense totally stopped & messed up on Windows 10 #4663

Closed
cateyes99 opened this issue Jul 16, 2021 · 2 comments · Fixed by #4664
Closed

IntelliSense totally stopped & messed up on Windows 10 #4663

cateyes99 opened this issue Jul 16, 2021 · 2 comments · Fixed by #4664

Comments

@cateyes99
Copy link

Environment data

dotnet --info output:

.NET SDK (reflecting any global.json):
 Version:   5.0.301
 Commit:    ef17233f86

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

Host (useful for support):
  Version: 5.0.7
  Commit:  556582d964

.NET SDKs installed:
  2.2.402 [C:\Program Files\dotnet\sdk]
  5.0.100 [C:\Program Files\dotnet\sdk]
  5.0.301 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

VS Code version: 1.57.1
C# Extension version: 1.23.13

Steps to reproduce

Open a C# project.

Expected behavior

Should provide correct IntelliSense as 1.23.12 shown below
image

Actual behavior

No intelliSense suggestion provided, only spelling suggestions might be available as screenshots below.
image
image
image

@ArkaneMoose
Copy link
Contributor

ArkaneMoose commented Jul 17, 2021

I thought I was going insane; glad to hear someone else is having this issue too.

Error squiggles, info on hover, refactoring, everything is working but the autocomplete. Very strange.

I'm able to reproduce this with even the most minimal example on Windows 10:

  1. Create a new project with the dotnet CLI tool:
    $ dotnet new console
    The template "Console Application" was created successfully.
    
    Processing post-creation actions...
    Running 'dotnet restore' on C:\Users\Rishov\Documents\OmnisharpTest\OmnisharpTest.csproj...
      Determining projects to restore...
      Restored C:\Users\Rishov\Documents\OmnisharpTest\OmnisharpTest.csproj (in 44 ms).
    Restore succeeded.
    
  2. Open the project in VS Code.
  3. Click "Yes" when asked "Required assets to build and debug are missing from 'OmnisharpTest'. Add them?"
  4. Open Program.cs in VS Code.
  5. Inside the static void Main(string[] args) method, type Console. and press Ctrl+Space.
  6. Observe: while red squiggly underlines appear to indicate errors, only spelling suggestions appear for autocompletion.
    image
  7. Hover over the WriteLine in Console.WriteLine("Hello World!");.
  8. Observe: hover info appears correctly.
    image

The extension is working enough to provide error squiggles and know what Console.WriteLine is, but it's not working enough to provide autocompletion for anything.

Here's my OmniSharp Log:

Starting OmniSharp server at 7/16/2021, 11:34:53 PM
    Target: c:\Users\Rishov\Documents\OmnisharpTest

OmniSharp server started.
    Path: c:\Users\Rishov\.vscode\extensions\ms-dotnettools.csharp-1.23.13\.omnisharp\1.37.12\OmniSharp.exe
    PID: 5072

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on Windows 6.2.9200.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 2 MSBuild instance(s)
            1: Visual Studio Build Tools 2019 16.10.31424.327 16.10.2 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin"
            2: StandAlone 17.0.0 - "c:\Users\Rishov\.vscode\extensions\ms-dotnettools.csharp-1.23.13\.omnisharp\1.37.12\.msbuild\Current\Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: Visual Studio Build Tools 2019 16.10.31424.327 16.10.2 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin"
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in 'c:\Users\Rishov\Documents\OmnisharpTest'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
        No solution files found in 'c:\Users\Rishov\Documents\OmnisharpTest'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for 'c:\Users\Rishov\Documents\OmnisharpTest\OmnisharpTest.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in 'c:\Users\Rishov\Documents\OmnisharpTest'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location 'c:\Users\Rishov\Documents\OmnisharpTest' on host 18056.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: c:\Users\Rishov\Documents\OmnisharpTest\OmnisharpTest.csproj
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file 'c:\Users\Rishov\Documents\OmnisharpTest\OmnisharpTest.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project 'c:\Users\Rishov\Documents\OmnisharpTest\OmnisharpTest.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Update project: OmnisharpTest
Received response for /quickinfo but could not find request.
Received response for /v2/getcodeactions but could not find request.

Here's my OmnisharpTest.csproj:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net5.0</TargetFramework>
  </PropertyGroup>

</Project>

Also confirmed this is happening with the latest beta version of Omnisharp, version 1.37.14-beta.3:

Starting OmniSharp server at 7/16/2021, 11:45:24 PM
    Target: c:\Users\Rishov\Documents\OmnisharpTest

OmniSharp server started.
    Path: c:\Users\Rishov\.vscode\extensions\ms-dotnettools.csharp-1.23.13\.omnisharp\1.37.14-beta.3\OmniSharp.exe
    PID: 11908

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on Windows 6.2.9200.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 2 MSBuild instance(s)
            1: Visual Studio Build Tools 2019 16.10.31424.327 16.10.2 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin"
            2: StandAlone 17.0.0 - "c:\Users\Rishov\.vscode\extensions\ms-dotnettools.csharp-1.23.13\.omnisharp\1.37.14-beta.3\.msbuild\Current\Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: Visual Studio Build Tools 2019 16.10.31424.327 16.10.2 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin"
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in 'c:\Users\Rishov\Documents\OmnisharpTest'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
        No solution files found in 'c:\Users\Rishov\Documents\OmnisharpTest'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for 'c:\Users\Rishov\Documents\OmnisharpTest\OmnisharpTest.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in 'c:\Users\Rishov\Documents\OmnisharpTest'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location 'c:\Users\Rishov\Documents\OmnisharpTest' on host 9556.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: c:\Users\Rishov\Documents\OmnisharpTest\OmnisharpTest.csproj
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file 'c:\Users\Rishov\Documents\OmnisharpTest\OmnisharpTest.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project 'c:\Users\Rishov\Documents\OmnisharpTest\OmnisharpTest.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Update project: OmnisharpTest
Received response for /completion but could not find request.

@ArkaneMoose
Copy link
Contributor

I am very silly and did not realize I had a pending VSCode update. Once I updated to VSCode 1.58.2, completions work again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants