Intellisense Not Working Correctly in VSCode

I can’t seem to get Intellisense to work for Unity C# in VSCode no matter what I do. I’ve tried seemingly every solution online, including reinstalling VSCode entirely and changing the version of the C# package for VSCode. I’ve tried everything in this link twice, including uninstalling and reinstalling.

“Received response for X but could not find request.” shows up when there should be some kind of tooltip or autocomplete. The warning for the symbol is new, I’m not sure what that is about.

Starting OmniSharp server at 9/6/2022, 11:34:23 PM
    Target: c:\Users\Jack\Documents\GitHub\Intellisense\Intellisense.sln

OmniSharp server started.
    Path: c:\Users\Jack\.vscode\extensions\ms-dotnettools.csharp-1.25.0-win32-x64\.omnisharp\1.39.0\OmniSharp.exe
    PID: 17376

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on Windows 6.2.9200.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
        Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK
[info]: OmniSharp.Services.DotNetCliService
        Using the 'dotnet' on the PATH.
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: Visual Studio Build Tools 2022 17.3.32825.248 17.3.1 - "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: Visual Studio Build Tools 2022 17.3.32825.248 17.3.1 - "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin"
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in 'c:\Users\Jack\Documents\GitHub\Intellisense'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Did not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
        Detecting projects in 'c:\Users\Jack\Documents\GitHub\Intellisense\Intellisense.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for 'c:\Users\Jack\Documents\GitHub\Intellisense\Assembly-CSharp.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in 'c:\Users\Jack\Documents\GitHub\Intellisense'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Did not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location 'c:\Users\Jack\Documents\GitHub\Intellisense' on host 16568.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: c:\Users\Jack\Documents\GitHub\Intellisense\Assembly-CSharp.csproj
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file 'c:\Users\Jack\Documents\GitHub\Intellisense\Assembly-CSharp.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project 'c:\Users\Jack\Documents\GitHub\Intellisense\Assembly-CSharp.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Update project: Assembly-CSharp
Received response for /completion but could not find request.
Received response for /completion/resolve but could not find request.
Received response for /completion/resolve but could not find request.
Received response for /completion/resolve but could not find request.
Received response for /completion/resolve but could not find request.
[warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService
        No symbol found. File: c:\Users\Jack\Documents\GitHub\Intellisense\Assets\NewBehaviourScript.cs, Line: 12, Column: 9.
[warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService
        No symbol found. File: c:\Users\Jack\Documents\GitHub\Intellisense\Assets\NewBehaviourScript.cs, Line: 7, Column: 17.
Received response for /v2/getcodeactions but could not find request.
[warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService
        No symbol found. File: c:\Users\Jack\Documents\GitHub\Intellisense\Assets\NewBehaviourScript.cs, Line: 13, Column: 9.

This may help you with intellisense and possibly other Visual Studio integration problems:

Sometimes the fix is as simple as doing Assets → Open C# Project from Unity. Other times it requires more.

Other times it requires you also nuke the userprefs and .vsconfig and other crufty low-value high-hassle files that Visual Studio tends to slowly damage over time, then try the above trick.

Barring all that, move on to other ideas:

Also, try update the VSCode package inside of Unity: Window → Package Manager → Search for Visual Studio Code Editor → Press the Update button

Also, this: No suggestions in Vscode

Thanks for the response! I tried almost everything on this list and still no luck. The one that I haven’t tried is the userprefs and .vsconfig files because I can’t find where those are located. Also, it’s possible I’m giving the wrong FrameworkPathOverride on that last link because I’m on Windows, but I’ve tried a couple of paths with that as well.

“Also, try update the VSCode package inside of Unity: Window → Package Manager → Search for Visual Studio Code Editor → Press the Update button”

This worked for me thanks Kurt

1 Like

Did you manage to fix this Jack. I’ve been having the same issue. Tried pretty much everything I’ve found online and no luck.

Starting OmniSharp server at 25/10/2022, 20:38:46
    Target: c:\Users\harry\OneDrive\Documents\Work\Gamedev\unity\Udemy - Project Boost\Udemy - Project Boost.sln

OmniSharp server started.
    Path: c:\Users\harry\.vscode\extensions\ms-dotnettools.csharp-1.24.4-win32-x64\.omnisharp\1.38.2\OmniSharp.exe
    PID: 9812

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on Windows 6.2.9200.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
        Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK
[info]: OmniSharp.Services.DotNetCliService
        Using the 'dotnet' on the PATH.
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 3 MSBuild instance(s)
            1: Visual Studio Community 2019 16.11.32929.386 16.11.2 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin"
            2: Visual Studio Build Tools 2022 17.3.32929.385 17.3.1 - "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin"
            3: StandAlone 17.1.1 - "c:\Users\harry\.vscode\extensions\ms-dotnettools.csharp-1.24.4-win32-x64\.omnisharp\1.38.2\.msbuild\Current\Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: Visual Studio Build Tools 2022 17.3.32929.385 17.3.1 - "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin"
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in 'c:\Users\harry\OneDrive\Documents\Work\Gamedev\unity\Udemy - Project Boost'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Did not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
        Detecting projects in 'c:\Users\harry\OneDrive\Documents\Work\Gamedev\unity\Udemy - Project Boost\Udemy - Project Boost.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for 'c:\Users\harry\OneDrive\Documents\Work\Gamedev\unity\Udemy - Project Boost\Assembly-CSharp.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in 'c:\Users\harry\OneDrive\Documents\Work\Gamedev\unity\Udemy - Project Boost'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Did not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location 'c:\Users\harry\OneDrive\Documents\Work\Gamedev\unity\Udemy - Project Boost' on host 3968.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: c:\Users\harry\OneDrive\Documents\Work\Gamedev\unity\Udemy - Project Boost\Assembly-CSharp.csproj
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file 'c:\Users\harry\OneDrive\Documents\Work\Gamedev\unity\Udemy - Project Boost\Assembly-CSharp.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project 'c:\Users\harry\OneDrive\Documents\Work\Gamedev\unity\Udemy - Project Boost\Assembly-CSharp.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Update project: Assembly-CSharp
Received response for /v2/getcodeactions but could not find request.

Can anyone point me in the right direction please?