-
Notifications
You must be signed in to change notification settings - Fork 669
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 out of sync #2927
Comments
BTW, there is nothing particularly special about this project. It's just a .NET Core 2.2 API project sample (it includes several services that we wire up by default for AKS, so it's suitable as a copy/paste for a starter project). If a Microsoft employee wants to look at the code, I can provide a link to an AzDO repository; just reach out to me internally at brwilso@. |
@bradwilson, that's probably due to a problem with the Omnisharp server... It's annoying, but if you go to the "Command Palette" (Ctrl-Shift-P) and restart Omnisharp you should have intellisense back to making sense again... ;) |
Yeah, that's why I reported this bug, because on average I'm restarting Omnisharp upwards of 20x per day (and it's a common complaint on my team). |
I have the same issue multiple times per day. I usually "Reload Window" to get it back in shape, but it's super annoying and time draining. |
I experienced the same issues every day, some scenarios I have seen it include:
All of them get resolved via restarting Omnisharp, but it gets annoying, is time consuming, and it explodes when the number of workspaces and projects grows up. |
Same issue here. VS Code 1.41.1, OmniSharp looks like version 6.2.9200.0. Switching projects via the project selector fixes it too (if you have more than one project in the workspace). Lately it's been happening to me multiple times per hour. |
Same issue here, very annoying. I've resorted to building on the command line a lot since IntelliSense is useless without constant restarts. |
I'm experiencing the same problem, with each change I have to keep restarting. |
It seems to be even worse, when you use Remote-Containers with the container running all the time. Omnisharp claims that it cannot load projects while running It's very annoying having to restart Omnisharp server so frequently. My environment:
A very simple example to reproduce the problem seems to be: create a new file and add a new class. Omnisharp doesn't pick it up. |
@ManfredLange @Tekadon58 Could you share the OmniSharp log from the Output pane from a run where you experience this issue? |
@JoeRobich As requested here the log file of such an instance. This time I can reproduce that when creating a new file - The log contains a few exceptions. Perhaps these provide a clue of what is happening. Just for the record, my environment has changed and is now:
|
Here is another Omnisharp log file iwht what looks like errors, e.g. "InvalidOperationException". Happy to send more when I observe similar issues or when I find what looks like errors in the omnisharp output in VS Code. Also, if there are any settings or short experiments that may help with diagnosing this issue, please let me know. |
Here is another instance, showing that the adornments (or whatever they are called) are missing in the source code. This happened after a fresh start of the container and a restart of Omnisharp. Then I ran a test under the debugger. The code under test threw an execption as it doesn't meet the test's requirement yet. Nothing out of the ordinary. Attached the screenshot of the test and the Omnisharp output that goes with it. Interestingly, in this case the omnisharp doesn't appear to show anything of interest. I assume the "adornments" are created by Omnisharp. I've attached a second screenshot that shows "adornments', e.g. "0 references", but at least 3 of them are in the wrong location, almost randomly. What else can I do to help diagnosing this? This issue is extremely disruptive. I need to restart omnisharp every couple of minutes. It is a huge impediment to flow. |
Internal Trackingdevdivcsef 412378 |
I run into this multiple times a day and I'm a bit surprised this hasn't been a priority to address. |
Same issue experienced frequently, daily. |
Exact same issue I think omnisharp forgets to update, or something maybe it's not polling changes. Especially with libraries that use source generators, after I update an attribute I have to restart omnisharp. |
Still occurring in 2024 |
We've made lots of updates to the C# extension since this issue was filed. @microhobby can you file a new issue if you're still experiencing this with updated logs? |
Issue Description
I frequently get a situation where Intellisense is out of sync, even though builds are successful. Restarting Omnisharp usually resolve this, though sometimes restarting VS Code is required.
Steps to Reproduce
Unknown at this time.
Performing package restore (
dotnet restore
) and/or building (dotnet build
) does not resolve the issue, regardless of where they're done from (Code task, Code internal terminal, external terminal, etc.).Expected Behavior
Intellisense matches known type information.
Actual Behavior
Intellisense shows unexpected errors with type information:
Logs
OmniSharp log
C# log
This log is empty.
Environment information
VSCode version: 1.32.3
C# Extension: 1.17.1
Mono Information
OmniSharp using global mono :5.18.1Dotnet Information
.NET Core SDK (reflecting any global.json): Version: 2.2.105 Commit: 7cecb35b92Runtime Environment:
OS Name: ubuntu
OS Version: 18.10
OS Platform: Linux
RID: ubuntu.18.10-x64
Base Path: /usr/share/dotnet/sdk/2.2.105/
Host (useful for support):
Version: 2.2.3
Commit: 6b8ad509b6
.NET Core SDKs installed:
2.2.105 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.2.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
The text was updated successfully, but these errors were encountered: