razor: MudBlazor on MacOS arm64 does not recognize tags resulting in RZ10012 in many places

Type: Bug

Issue Description

When trying to work on our Blazor WASM project in VS Code, I get RZ10012 error highlited on every custom component in Razor pages. It could do something with LSP, because when I select “Use Omnisharp” in C# extension settings, the problem goes away. It works as expected in every other IDE.

Logs

extensions log.zip

Environment information

VSCode version: 1.85.2 C# Extension: 2.15.30 Using OmniSharp: false

Dotnet Information .NET SDK: Version: 8.0.100 Commit: 57efcf1350 Workload version: 8.0.100-manifests.8d38d0cc

Runtime Environment: OS Name: Windows OS Version: 10.0.22631 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\8.0.100\

.NET workloads installed: Workload version: 8.0.100-manifests.8d38d0cc [wasm-tools-net6] Installation Source: VS 17.8.34322.80 Manifest Version: 8.0.0/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.net6\8.0.0\WorkloadManifest.json Install Type: Msi

[wasm-tools] Installation Source: VS 17.8.34322.80 Manifest Version: 8.0.0/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.current\8.0.0\WorkloadManifest.json Install Type: Msi

[maui-windows] Installation Source: VS 17.8.34322.80 Manifest Version: 8.0.3/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maui\8.0.3\WorkloadManifest.json Install Type: Msi

[maccatalyst] Installation Source: VS 17.8.34322.80 Manifest Version: 17.0.8478/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maccatalyst\17.0.8478\WorkloadManifest.json Install Type: Msi

[ios] Installation Source: VS 17.8.34322.80 Manifest Version: 17.0.8478/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.ios\17.0.8478\WorkloadManifest.json Install Type: Msi

[android] Installation Source: VS 17.8.34322.80 Manifest Version: 34.0.43/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.android\34.0.43\WorkloadManifest.json Install Type: Msi

Host: Version: 8.0.0 Architecture: x64 Commit: 5535e31a71

.NET SDKs installed: 8.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found: x86 [C:\Program Files (x86)\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables: Not set

global.json file: Not found

Learn more: https://aka.ms/dotnet/info

Download .NET: https://aka.ms/dotnet/download

Visual Studio Code Extensions
Extension Author Version Folder Name
blazorwasm-companion ms-dotnettools 1.1.4 ms-dotnettools.blazorwasm-companion-1.1.4
csdevkit ms-dotnettools 1.2.7 ms-dotnettools.csdevkit-1.2.7-win32-x64
csharp ms-dotnettools 2.15.30 ms-dotnettools.csharp-2.15.30-win32-x64
vscode-dotnet-runtime ms-dotnettools 2.0.1 ms-dotnettools.vscode-dotnet-runtime-2.0.1
vscode-open-multiple-files fabiospampinato 1.4.0 fabiospampinato.vscode-open-multiple-files-1.4.0
vscode-solution-explorer fernandoescolar 0.8.5 fernandoescolar.vscode-solution-explorer-0.8.5
vscodeintellicode-csharp ms-dotnettools 0.1.26 ms-dotnettools.vscodeintellicode-csharp-0.1.26-win32-x64

Extension version: 2.15.30 VS Code version: Code 1.85.2 (8b3775030ed1a69b13e4f4c628c612102e30a681, 2024-01-18T06:40:10.514Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info
Item Value
CPUs AMD Ryzen 7 3700X 8-Core Processor (16 x 3593)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.93GB (1.36GB free)
Process Argv . --crash-reporter-id 2a60ca11-95f2-43ae-8dd5-6f5bd810ef7b
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
0bi6i642:30951795
pythongtdpath:30769146
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
accentitlementst:30887150
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
dsvsc019a:30951918
7j2b6412:30949929

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 57 (22 by maintainers)

Most upvoted comments

@ryzngard Sorry to report I see no change using the latest C# Extensions.

I have C# v2.22.5 release version C# Dev Kit v1.4.29 release version

Thank you for testing! I’ll take a look sometime this week on my mac and see if I can get the current repro. I wasn’t able to immediately get a local repro with the latest so it will take a bit more digging.

@ryzngard Sorry to report I see no change using the latest C# Extensions.

I have C# v2.22.5 release version C# Dev Kit v1.4.29 release version

@ryzngard I also see the same issue on codespaces (Linux?) I believe this eliminates my environment.

The issue is this one that is now closed. Even though the warnings may eventually go to zero sometimes. Opening a file causes the problem again with RZ10012 which does not go away even after leaving the IDE to settle down.

@Jad-EL yes, with a repro project if you can.

I’ll update the title, but I spent time this afternoon debugging. I hit a few issues with building the razor repo on mac arm, so added some fixes there.

I noticed after a while the c# code eventually works. One key thing to look for is the presence of a project.razor.vscode.bin file in the obj folder. I wasn’t getting that before, so we’re making progress. I’m still seeing errors in our own project mapping: asking for details in a razor document results in us trying to find it and going into the fallback/misc project. That explains no tags being found because that project doesn’t have the necessary hookup for imports etc.

I’ll continue to dig into this time permitting, but wanted to give a short update. As of now for the repro I have MudBlazor functions on Windows but not MacOS. I may do a sanity check on linux over the weekend to see if it might have a related issue.

@mikes-gh it’s been an unfortunate set of issues that result in similar behavior, but all root caused differently. Right now I’m using this to track the mac OS issue with the mudblazor project.

@haggerty-william Thank you, I think I’ll keep them in _imports despite the errors for now. But at least I can use on vs code again thanks to you.

I was able to get around this by ensuring that all my razor files with code were seperated into a .razor & .razor.cs and explicitly inheiriting from ComponentBase(or other appropriate class) in the cs file. It was a pain but now I can look at razor files without seeing all yellow squiggles and hundreds of “Problems”. It takes a long time with lots of ups and downs but my problems counter eventually settles at 0

Edit: Had to move all the @inject statements into the cs file too.

Appears fixed in C# Dev Kit pre-release - v1.5.10 (pre-release)

Not for me

Not for me either

Appears fixed in C# Dev Kit pre-release - v1.5.10 (pre-release)

Not for me

Hi ! I’m facing the same issue with vscode, on a blazor project using mudblazor as well. I have more than 800 “problems” / warnings on razor files (RZ10012, CS0013) But enabling Omnisharp doesn’t fix my case. I just can’t develop with vscode anymore for now, obliged to switch back to Visual Studio. Do you guys know if there is a workaround ?

You have to disable C# Dev Kit in order for OmniSharp to work after changing the setting.

Hope this helps

Yep, it’s better, thanks a lot !

Unfortunately not. There’s a known issue about that