In latest VSMain with latest .NET SDK opening a Razor project results in 1 set of diagnostics being produced (the current state of the file). Afterwards no diagnostics are generated (or regenerated).
Debugging through it looks like we ask C# for diagnostics at which point they don't return any updated diagnostics. Recently design time bits moved towards using SourceGenerator enabled solutions so the initial thought was that SourceGenerators were the issue because on solution open we'd get:
However, after working with the aspnetcore runtime team, them fixing the issue, the diagnostics still show issue.
Other Notes:
Looks like if you have a preview3 SDK this manifests as "ambiguous errors":
In latest VSMain with latest .NET SDK opening a Razor project results in 1 set of diagnostics being produced (the current state of the file). Afterwards no diagnostics are generated (or regenerated).
Debugging through it looks like we ask C# for diagnostics at which point they don't return any updated diagnostics. Recently design time bits moved towards using SourceGenerator enabled solutions so the initial thought was that SourceGenerators were the issue because on solution open we'd get:
However, after working with the aspnetcore runtime team, them fixing the issue, the diagnostics still show issue.
Other Notes: