OmniSharp IntelliSense only works for around a second after making changes
Environment data
dotnet --info output:
.NET Command Line Tools (1.0.0-preview2-003131)
Product Information: Version: 1.0.0-preview2-003131 Commit SHA-1 hash: 635cf40e58
Runtime Environment: OS Name: Mac OS X OS Version: 10.11 OS Platform: Darwin RID: osx.10.11-x64
VS Code version: 1.6.1 C# Extension version: 1.4.1
Steps to reproduce
General Info
After the latest Visual Studio Code update 1.6.1. The intellij has stopped working properly. We have 4 .net core projects in seperate folders under the root with a global.json file. This setup has been working perfectly untill the update. Intellij info now only shows up for about a second after making changes and then they disappear.
No errors in the Output OmniSharp Log. The warnings/errors stop showing after the following command runs:
"[INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /codecheck: 200 192ms"
Additional output when choosing project(no errors): `Starting OmniSharp server at 10/17/2016, 4:26:45 PM Target: /Users/west/projects/project-backend-core/project.API
OmniSharp server started Path: /Users/west/.vscode/extensions/ms-vscode.csharp-1.4.1/out/.omnisharp-coreclr/OmniSharp PID: 1277
OmniSharp: -s /Users/west/projects/project-backend-core/project.API --hostPID 866 DotNet:enablePackageRestore=false --encoding utf-8 --stdio [INFORMATION:OmniSharp.Startup] Omnisharp server running using Stdio at location '/Users/west/projects/project-backend-core/project.API' on host 866. [INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Initializing in /Users/west/projects/project-backend-core/project.API [INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Auto package restore: False [INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Update workspace context [INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Update project /Users/west/projects/project-backend-core/project.API [INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Add project /Users/west/projects/project-backend-core/project.API/project.json => fa0f35f5-272d-447a-b72f-5ad5f84712ce [INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Resolving projects references [INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Processing [ProjectState] project.API/.NETCoreApp,Version=v1.0 [INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Added 215 and removed 0 file references [INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Added 98 and removed 0 documents. [INFORMATION:OmniSharp#MSBuild] No solution files found in '/Users/west/projects/project-backend-core/project.API' [INFORMATION:OmniSharp.Startup] Configuration finished. [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /projects: 200 42ms`
Tried reinstallation the C# extension.
Expected behavior
To show all project-wide warnings and errors
Actual behavior
Only shows warnings/errors for the current open file for around a second then they disappear.
I'm having the same issue. I've found that if I create a new blank project using dotnet new, and open that in VSCode, this behaves as expected.
I don't know if it's related to it being multiple projects, or if it's our .vscode/tasks.json file missing something critical for this to work - I'll try debugging a little further to see if I can figure out a bit more narrow scope of the problem.
Creating two new projects (with the structure src/proj1/ and src/proj2) with a global.json in the root directory defining { "projects": ["src"] } seems to work for a blank/empty test project, but not our larger, more complicated solutions here. The other projects behave in the same way as reported by @oscarwest earlier - errors / warnings show up for a second or two before they disappear, nothing interesting happening in the OmniSharp log.
Edit: this is probably a duplicate of #812?
Yes, I think it probably is a duplicate of that one, but this one explains it a lot better. I'm using it with Unity and seeing the same issue, but I wasn't sure if it was something to do with VSCode or the settings from Unity.
Anyway, what appears to be happening is it builds up the list of errors, then groups them by the files they are in, then this list is truncated to 1 leaving only the errors from a single file.
I'm having the same issue. =\
This issue was fixed by installing v1.5-beta4 https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.5-beta4