Intellisense not working after update to vscode 1.35
Issue Type: Bug
- open vscode with dotnet core sln
- get warning notification that some projects couldn't load
- see intellisense not able to provide methods, classes, etc. It can only give me suggestions of things I've already typed.
I tried to uninstall and reinstall the extension. I had previously installed a beta version in order to fix an issue the extension had with the latest version of the linux kernel or something like that.
Here's some logging:
Starting OmniSharp server at 6/7/2019, 10:57:37 AM
Target: /home/seanmccay/repos/tamus.livestock/Livestock.sln
OmniSharp server started.
Path: /home/seanmccay/.vscode/extensions/ms-vscode.csharp-1.19.1/.omnisharp/1.32.19/run
PID: 3231
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on ubuntu 19.4 (x64)
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: StandAlone 15.0 - "/home/seanmccay/.vscode/extensions/ms-vscode.csharp-1.19.1/.omnisharp/1.32.19/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to '/home/seanmccay/.vscode/extensions/ms-vscode.csharp-1.19.1/.omnisharp/1.32.19/omnisharp/.msbuild/Current/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 15.0 - "/home/seanmccay/.vscode/extensions/ms-vscode.csharp-1.19.1/.omnisharp/1.32.19/omnisharp/.msbuild/Current/Bin"
MSBuildExtensionsPath = /home/seanmccay/.vscode/extensions/ms-vscode.csharp-1.19.1/.omnisharp/1.32.19/omnisharp/.msbuild
BypassFrameworkInstallChecks = true
CscToolPath = /home/seanmccay/.vscode/extensions/ms-vscode.csharp-1.19.1/.omnisharp/1.32.19/omnisharp/.msbuild/Current/Bin/Roslyn
CscToolExe = csc.exe
MSBuildToolsPath = /home/seanmccay/.vscode/extensions/ms-vscode.csharp-1.19.1/.omnisharp/1.32.19/omnisharp/.msbuild/Current/Bin
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/home/seanmccay/repos/tamus.livestock'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.WorkspaceInitializer
Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.
[info]: OmniSharp.MSBuild.ProjectSystem
Detecting projects in '/home/seanmccay/repos/tamus.livestock/Livestock.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/seanmccay/repos/tamus.livestock/Livestock.Core/Livestock.Core.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/seanmccay/repos/tamus.livestock/Livestock.Infrastructure/Livestock.Infrastructure.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/seanmccay/repos/tamus.livestock/Livestock.UnitTests/Livestock.UnitTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/seanmccay/repos/tamus.livestock/Livestock.Web.API/Livestock.Web.API.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/seanmccay/repos/tamus.livestock/Livestock.Web.UI/Livestock.Web.UI.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/seanmccay/repos/tamus.livestock/Livestock.Infrastructure.Database/Livestock.Infrastructure.Database.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/home/seanmccay/repos/tamus.livestock'.
[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /home/seanmccay/repos/tamus.livestock/Livestock.Core/Livestock.Core.csproj
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.WorkspaceInitializer
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/home/seanmccay/repos/tamus.livestock' on host 2695.
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file '/home/seanmccay/repos/tamus.livestock/Livestock.Core/Livestock.Core.csproj'.
/home/seanmccay/repos/tamus.livestock/Livestock.Core/Livestock.Core.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found. /home/seanmccay/repos/tamus.livestock/Livestock.Core/Livestock.Core.csproj
that occurs for each project and then:
[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /home/seanmccay/repos/tamus.livestock/Livestock.Core/Livestock.Core.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /home/seanmccay/repos/tamus.livestock/Livestock.Infrastructure/Livestock.Infrastructure.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /home/seanmccay/repos/tamus.livestock/Livestock.UnitTests/Livestock.UnitTests.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /home/seanmccay/repos/tamus.livestock/Livestock.Web.API/Livestock.Web.API.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /home/seanmccay/repos/tamus.livestock/Livestock.Web.UI/Livestock.Web.UI.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /home/seanmccay/repos/tamus.livestock/Livestock.Infrastructure.Database/Livestock.Infrastructure.Database.csproj
Extension version: 1.19.1 VS Code version: Code 1.35.0 (553cfb2c2205db5f15f3ee8395bbd5cf066d357d, 2019-06-04T01:13:26.790Z) OS version: Linux x64 5.0.0-15-generic
System Info
| Item | Value |
|---|---|
| CPUs | AMD Ryzen 7 1700 Eight-Core Processor (16 x 1501) |
| GPU Status | 2d_canvas: enabled checker_imaging: disabled_off flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: disabled_software rasterization: disabled_software surface_synchronization: enabled_on video_decode: unavailable_off webgl: enabled webgl2: enabled |
| Load (avg) | 0, 0, 0 |
| Memory (System) | 31.40GB (26.97GB free) |
| Process Argv | --unity-launch |
| Screen Reader | no |
| VM | 0% |
@seanmccay Could you try setting "omnisharp.useGlobalMono": never and then restarting vscode
We have often seen similar issues when mono is upgraded on linux/mac systems and the new version doesnt have certain files that are needed by omnisharp. When you set the above option, you instruct omnisharp to use the mono version shipped with itself which has all the necessary files.
Ok, updated my user settings and restarted vscode + omnisharp and still get the same result. Is there another step I should take to make sure the setting is taking effect?
@akshita31 I just rebooted my machine as well. I'm not sure if there might be something cached somewhere... Still pretty new to Linux. I still have the same results though.
It looks like I get Intellisense for stuff outside of my own code like in Microsoft/System namespaces at least but omnisharp still can't load my projects.
@akshita31 Tried out extension version 1.20.0-beta1 and no changes. So I'm guessing Mono isn't the issue? Unless the useGlobal setting isn't taking effect... Not sure how to tell.
I reinstalled dotnet core following the instructions on the .net core site and somehow went from version 2.2.3 to 2.2.204, but my intellisense is operational again :man_shrugging: