Skip to content

Must use the @namespace for components in MVC app #31429

@nitrospaz

Description

@nitrospaz

Description

[Enter feedback here]
If you are adding razor or Blazor components to a MVC app the components must use the @namespace reference in the @code section. Otherwise, the program can't find the component.

This is not referenced or explained in any of the examples.

This is a screenshot of how the component code should look with the @namespace reference.
image

Page URL

https://learn.microsoft.com/en-us/aspnet/core/blazor/components/integration?view=aspnetcore-8.0#component-namespaces

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/components/integration.md

Document ID

d7e39bbc-cd54-92aa-4997-f9dd39dd6ef3

Article author

@guardrex

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions