dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.83k stars 659 forks source link

Blazor broken in newer versions (above v2.30.28) #7255

Closed artyomszasa closed 1 week ago

artyomszasa commented 1 month ago

Blazor/razor broken when using C# extension with version above v2.30.28 . It may be related to razor/blazor yet reverting C# extension to the version specified above workarounds the issue hence reporting the issue here. C# Dev Kit is also installed yet trying different versions yields the same result. Only downgrading C# extension itself helps.

Environment data

dontet --info:

.NET SDK:
 Version:           8.0.301
 Commit:            1a0e9c0300
 Workload version:  8.0.300-manifests.011fccd5
 MSBuild version:   17.10.4+10fbfbf2e

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  22.04
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /usr/share/dotnet/sdk/8.0.301/

.NET workloads installed:
 [wasm-tools]
   Installation Source: SDK 8.0.300
   Manifest Version:    8.0.6/8.0.100
   Manifest Path:       /usr/share/dotnet/sdk-manifests/8.0.100/microsoft.net.workload.mono.toolchain.current/8.0.6/WorkloadManifest.json
   Install Type:        FileBased

 [wasi-experimental]
   Installation Source: SDK 8.0.300
   Manifest Version:    8.0.6/8.0.100
   Manifest Path:       /usr/share/dotnet/sdk-manifests/8.0.100/microsoft.net.workload.mono.toolchain.current/8.0.6/WorkloadManifest.json
   Install Type:        FileBased

 [maui-android]
   Installation Source: SDK 8.0.300
   Manifest Version:    8.0.21/8.0.100
   Manifest Path:       /usr/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.21/WorkloadManifest.json
   Install Type:        FileBased

Host:
  Version:      8.0.6
  Architecture: x64
  Commit:       3b8b000a0e

.NET SDKs installed:
  6.0.423 [/usr/share/dotnet/sdk]
  7.0.410 [/usr/share/dotnet/sdk]
  8.0.301 [/usr/share/dotnet/sdk]

VS Code version: 1.89.1 C# Extension version: v2.34.12 C# Dev Kit version: v1.8.8 (pre-release)

logs

See attachments: csharp.log razor.log

Steps to reproduce

  1. Create project using dotnet new blazorwasm
  2. Open folder in Visual Studio Code
  3. Switch to App.razor
  4. Every component is reported as unrecognized (RZ10012)

screen

Expected behavior

Razor components (both from packages and created in the project) recognized as components.

Actual behavior

Every component is reported as unrecognized (RZ10012)

phil-allen-msft commented 1 month ago

We're sorry you are running into this. We believe we have a fix in progress that should help with this issue; you can follow the status of https://github.com/dotnet/razor/issues/10547 and we will update it when we have a version number that we expect the fix to be in.

ryzngard commented 1 week ago

I believe this is fixed in v2.39.28 (pre-release). Please let me know if you're still having this issue