error RZ9985: Multiple components use the tag 'Card'. Components: Rz.Components.Shared.Card, Rz.Components.Widgets.Card means two components with the same name are both in scope where you used the tag. Write the tag with its full namespace, or remove one of the two @using lines, and the build passes.

The message lists both candidates, so the fix is to pick one. In the test below the fully qualified tag <Rz.Components.Widgets.Card /> took the build from one error to none without touching either component.

The error

...\Rz\Components\Pages\Home.razor(7,1): error RZ9985: Multiple components use the tag 'Card'. Components: Rz.Components.Shared.Card, Rz.Components.Widgets.Card [...\Rz\Rz.csproj]
...
    0 Warning(s)
    1 Error(s)

Why it happens

A component's tag is its class name, and its namespace follows its folder. Two files named Card.razor, one in Components/Shared and one in Components/Widgets, become Rz.Components.Shared.Card and Rz.Components.Widgets.Card. On their own they do not clash. The page imported both namespaces and then wrote the short tag:

@page "/"
@using Rz.Components.Shared
@using Rz.Components.Widgets

<h1>Dashboard</h1>

<Card />

With both namespaces imported, <Card /> matches two components, and the Razor compiler stops with RZ9985 at line 7, column 1, the position of the tag. The same pair of @using lines moved to the end of Components/_Imports.razor, with the page reduced to @page "/", the heading and <Card />, gave the same error at the tag's new position:

...\Rz\Components\Pages\Home.razor(5,1): error RZ9985: Multiple components use the tag 'Card'. Components: Rz.Components.Shared.Card, Rz.Components.Widgets.Card [...\Rz\Rz.csproj]
...
    0 Warning(s)
    1 Error(s)

So the page that fails can carry no @using line at all. The failing page sat in Components/Pages, a folder below the _Imports.razor that held the two lines, so look in the _Imports.razor files of that folder and the folders above it as well.

The fix

@page "/"
@using Rz.Components.Shared
@using Rz.Components.Widgets

<h1>Dashboard</h1>

<Rz.Components.Widgets.Card />

With the namespace written in the tag, dotnet build -nologo reported 0 Warning(s) and 0 Error(s). The check was the build; the page was not opened.

The other tested way out is to keep the short tag and import only the namespace you need: with _Imports.razor back to the template and the page holding only @using Rz.Components.Widgets above <Card />, dotnet build -nologo --no-incremental reported 0 Warning(s) and 0 Error(s). A third option, not built here, is to rename one of the components, for example WidgetCard.razor, if both are used side by side often. Renaming changes every place that uses the component, so the full name is the smaller edit.

How it was reproduced

A fresh project from dotnet new blazor -o Rz --interactivity Server on .NET SDK 10.0.403 (ASP.NET Core 10.0.14 runtime), with two one-line components Components/Shared/Card.razor and Components/Widgets/Card.razor and the home page above, built with dotnet build -nologo before and after the change. No package was added.

Frequently asked

What does RZ9985 Multiple components use the tag mean?
Two components with the same class name are both in scope on the page; in the test, two namespaces were imported with using lines. The message lists both full names.
How do I use a Blazor component with its full namespace?
Write the namespace in the tag, for example Rz.Components.Widgets.Card as the element name. In the test that removed RZ9985 with both namespaces still imported.
Can two Blazor components have the same name?
Yes, in different folders and therefore different namespaces. The build fails only on a page where both are in scope and the short tag is used.

More decoded errors in the Fixes category. When the opposite happens and no component matches a tag, the build gives RZ10012: Found markup element with unexpected name instead.