OmniSharp / omnisharp-roslyn

OmniSharp server (HTTP, STDIO) based on Roslyn workspaces

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors in affected files don't show up after changes when EnableAnalyzersSupport is true

Nebulaxin opened this issue · comments

For example:

// A.cs

public class A
{
    public string Name { get; set; }
}
// Program.cs

A a = new();
a.Name = "Name";
System.Console.WriteLine(a.Name);

If you change Name to Name1 in A.cs, then there will be no errors, but when you switch to Program.cs there will be two errors saying that A.Name doesn't exist

And even when you change Name1 back to Name these two errors will disappear when you will switch again to Program.cs

For some reason this doesn't happen when EnableAnalyzersSupport is false; errors will be detected automatically and will disappear after fix