Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Found markup element with unexpected name 'xxxx'. If this is intended to be a component, add a @using directive for its namespace.Razor(RZ10012) #7625

Closed
pebcakerror opened this issue Oct 3, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@pebcakerror
Copy link

Issue Description

All components get an error Found markup element with unexpected name 'xxxx'. If this is intended to be a component, add a @using directive for its namespace.Razor(RZ10012)

The project does not have errors in Visual Studio, it buids and runs just fine with dotnet CLI.

Maybe related to #49

Steps to Reproduce

Open any Blazor project with custom components.

Expected Behavior

It should not be giving intellisense errors

Actual Behavior

It is throwing an intellisense error on every custom component Found markup element with unexpected name 'xxxx'. If this is intended to be a component, add a @using directive for its namespace.Razor(RZ10012)

Logs

C# log

c-sharp.log

C# LSP Trace Logs

razor.log

Environment information

VSCode version: 1.93.1
C# Extension: 2.45.25
Using OmniSharp: false

Dotnet Information .NET SDK: Version: 8.0.303 Commit: 29ab8e3268 Workload version: 8.0.300-manifests.28112636 MSBuild version: 17.10.4+10fbfbf2e

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

.NET workloads installed:
[aspire]
Installation Source: VS 17.10.35027.167
Manifest Version: 8.0.0/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.0.0\WorkloadManifest.json
Install Type: Msi

Host:
Version: 8.0.8
Architecture: x64
Commit: 08338fcaa5

.NET SDKs installed:
5.0.408 [C:\Program Files\dotnet\sdk]
6.0.321 [C:\Program Files\dotnet\sdk]
7.0.317 [C:\Program Files\dotnet\sdk]
8.0.108 [C:\Program Files\dotnet\sdk]
8.0.303 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.8 [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
csdevkit ms-dotnettools 1.11.11 ms-dotnettools.csdevkit-1.11.11-win32-x64
csharp ms-dotnettools 2.45.25 ms-dotnettools.csharp-2.45.25-win32-x64
fabric8-analytics redhat 0.9.5 redhat.fabric8-analytics-0.9.5
live-server ms-vscode 0.4.15 ms-vscode.live-server-0.4.15
remote-containers ms-vscode-remote 0.384.0 ms-vscode-remote.remote-containers-0.384.0
remote-wsl ms-vscode-remote 0.88.4 ms-vscode-remote.remote-wsl-0.88.4
vs-code-prettier-eslint rvest 6.0.0 rvest.vs-code-prettier-eslint-6.0.0
vscode-docker ms-azuretools 1.29.3 ms-azuretools.vscode-docker-1.29.3
vscode-dotnet-runtime ms-dotnettools 2.1.7 ms-dotnettools.vscode-dotnet-runtime-2.1.7
vscode-eslint dbaeumer 3.0.10 dbaeumer.vscode-eslint-3.0.10
xml DotJoshJohnson 2.5.1 dotjoshjohnson.xml-2.5.1
@TrieBr
Copy link

TrieBr commented Oct 14, 2024

Have you tried the prerelease versions? I recently installed v2.51.17 and it seemed to magically fix all of these issues for me.

@ryzngard
Copy link
Contributor

Thanks @TrieBr :)

Yes, we've made some fixes to help reliability of tooling in VS Code. The prereleases should have a much better experience for users who were facing issues. I'm going to close this as fixed for now but feel free to reopen if this is still broken for you in the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants