Skip to content

[BUG] Errors from Razor generated source files appear in error list #1941

@captainsafia

Description

@captainsafia

When editing a solution that contains Razor files, errors from the underlying C# generated files appear in the error list as seen below:

Image

Repro steps:

  1. Clone the dotnet/aspire repo: https://github.com/dotnet/aspire
  2. Install latest .NET SDK-preview version
  3. Run ./build.sh
  4. Run ./start-code.sh
  5. Wait for the Aspire.sln to load.
  6. Observe the errors in the list.
    I noticed that this appears to be happening to source files that are in our template directory so that might be related to why this granularity of error is showing up.

Also, note that if you click on the error from the list the editor fails to resolve it so the errors are noisy and non-actionable (not that being able to view the generated code makes them that much more actionable).

Image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions