You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the last time you compiled there was a programming error, you will continue to observe the red underline indicating an error until you compile again. This is inconsistent behavior with the real-time detection between compiles, and leads to a confusing state.
The phantom error will also remain in the 'problems' window and file sidebar until recompile, even if fixed. After a recompile, the error is removed from both 'problems' and intellisense.
The incorrect underline persists if omnisharp is restarted, as well as if the file is closed and re-opened. However, if VS Code window is reloaded, the stale underline goes away.
Comparatively, Intellisense red underlines work normally for errors that are introduced and fixed between compiles. (Automatic flag & unflag of error in real-time). It's not until the error is compiled that it becomes persistent until the next compile.
Steps to Reproduce
(Starting from a clean, compilable code base)
Intentionally create an error, such as introducing a typo in the name of a class you are trying to instantiate.
F5 to attempt a debug -- compile fails due to the type not being able to be found
Click Abort to return to code
Observe red underline showing the error
Fix typo in class name
Red underline is still visible with type error, despite the error having been fixed [BUG]
Press F5 to attempt a second debug. Compile is OK and red underline now disappears.
Expected Behavior
Intellisense red underlines reflects the current, real-time state of the code.
Actual Behavior
Intellisense red underlines reflects an inconsistent state -- combining the errors (but not fixes) of the previous compile attempt plus additional any errors introduced since then. Since the errors update elsewhere, the developer expects the errors shown to be the current state of the code, and then spends time chasing after errors that are already fixed.
Logs
OmniSharp log
Post the output from Output-->OmniSharp log here
C# log
Post the output from Output-->C# here
Environment information
VSCode version: 1.46.1 C# Extension: 1.22.1
Mono Information
OmniSharp using built-in monoDotnet Information
.NET Core SDK (reflecting any global.json):
Version: 3.1.301
Commit: 7feb845744
Runtime Environment:
OS Name: ubuntu
OS Version: 18.04
OS Platform: Linux
RID: ubuntu.18.04-x64
Base Path: /usr/share/dotnet/sdk/3.1.301/
Host (useful for support):
Version: 3.1.5
Commit: 65cd789777
As a workaround to stop reporting errors from the build task, you could update your tasks.json such that the "build" task doesn't define a problemMatcher.
Issue Description
If the last time you compiled there was a programming error, you will continue to observe the red underline indicating an error until you compile again. This is inconsistent behavior with the real-time detection between compiles, and leads to a confusing state.
The phantom error will also remain in the 'problems' window and file sidebar until recompile, even if fixed. After a recompile, the error is removed from both 'problems' and intellisense.
The incorrect underline persists if omnisharp is restarted, as well as if the file is closed and re-opened. However, if VS Code window is reloaded, the stale underline goes away.
Comparatively, Intellisense red underlines work normally for errors that are introduced and fixed between compiles. (Automatic flag & unflag of error in real-time). It's not until the error is compiled that it becomes persistent until the next compile.
Steps to Reproduce
Expected Behavior
Intellisense red underlines reflects the current, real-time state of the code.
Actual Behavior
Intellisense red underlines reflects an inconsistent state -- combining the errors (but not fixes) of the previous compile attempt plus additional any errors introduced since then. Since the errors update elsewhere, the developer expects the errors shown to be the current state of the code, and then spends time chasing after errors that are already fixed.
Logs
OmniSharp log
C# log
Environment information
VSCode version: 1.46.1
C# Extension: 1.22.1
Mono Information
OmniSharp using built-in monoDotnet Information
.NET Core SDK (reflecting any global.json): Version: 3.1.301 Commit: 7feb845744Runtime Environment:
OS Name: ubuntu
OS Version: 18.04
OS Platform: Linux
RID: ubuntu.18.04-x64
Base Path: /usr/share/dotnet/sdk/3.1.301/
Host (useful for support):
Version: 3.1.5
Commit: 65cd789777
.NET Core SDKs installed:
2.1.807 [/usr/share/dotnet/sdk]
3.1.301 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.19 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.19 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.19 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.5 [/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: