Skip to content

[WebToolsE2E][Blue] When creating a Razor Page/Razor View file, I encounter the error: "Index1. cshtml appears to not be part of any project..." #8512

@v-reinawang

Description

@v-reinawang

REGRESSION INFO: Works on release C#DK 1.41.11[Includes C# 2.87.31]

INSTALL STEPS

  1. Repro OS: Win11 24H2 ENU
  2. Install latest VSCode (latest released version 1.103.0)
  3. Install SDK 10.0 Preview 7/SDK 9.0
  4. Install C# prerelease [2.88.42] and C#DK prerelease [1.50.11]

REPRO STEPS

  1. Create an ASP.NET Core Empty project
  2. Right click the project > New file > Select Razor Page/Razor View> Enter
  3. Open OUTPUT window > Select Razor Log

ACTUAL
Will encounter the error:

2025-08-08 02:58:54.254 [error] [Services.IncompatibleProjectNotifier] The Razor editor utilizes the Razor Source Generator. Index1.cshtml appears to not be part of any project, so the source generator is not present and the editing experience will be limited. No more messages will be logged for this scenario.
[Services.IncompatibleProjectNotifier] The Razor editor utilizes the Razor Source Generator. Index1.cshtml appears to not be part of any project, so the source generator is not present and the editing experience will be limited. No more messages will be logged for this scenario.
Stack Trace:
Error: [Services.IncompatibleProjectNotifier] The Razor editor utilizes the Razor Source Generator. Index1.cshtml appears to not be part of any project, so the source generator is not present and the editing experience will be limited. No more messages will be logged for this scenario.
    at RO.log (c:\Users\v-reinawang\.vscode\extensions\ms-dotnettools.csharp-2.88.42\dist\extension.js:1207:18821)
    at c:\Users\v-reinawang\.vscode\extensions\ms-dotnettools.csharp-2.88.42\dist\extension.js:1212:33608
    at mr (c:\Users\v-reinawang\.vscode\extensions\ms-dotnettools.csharp-2.88.42\dist\extension.js:51:1620)
    at Mr (c:\Users\v-reinawang\.vscode\extensions\ms-dotnettools.csharp-2.88.42\dist\extension.js:50:7629)
    at Immediate._onImmediate (c:\Users\v-reinawang\.vscode\extensions\ms-dotnettools.csharp-2.88.42\dist\extension.js:50:7324)
    at processImmediate (node:internal/timers:485:21)
Image

EXPECTED
There should be no errors.

Metadata

Metadata

Assignees

Labels

RazorfixedFixed and available in the stable version of C# Extension.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions