Skip to content

CS0234 : The type or namespace name '...' does not exist in the namespace '__Blazor....' #37482

Closed
@kefyru

Description

@kefyru
<Parent ItemsProvider="@_itemsProvider">
   <Child/>
</Parent>

where

[CascadingTypeParameter(nameof(T))]
public class Parent<T>: IComponent 
{
   [Parameter] 
   public IItemsProvider<T> ItemsProvider {get;set;}
}

public class Child<T>: IComponent {}

generated razor.g.cs:

public static void CreateParent_1_CaptureParameters<T>(
   global::MyApp.IItemsProvider<T> __arg0, 
   out global::MyApp.IItemsProvider<T> __arg0_out
) 
{
 __arg0_out = __arg0;
}

public static void CreateChild_2<T>(
   global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder, 
   int seq, 
   MyApp.IItemsProvider<T> __syntheticArg0 // problem here: seems like lacks 'global::'
)
{
        __builder.OpenComponent<global::MyApp.Child<T>>(seq);
        __builder.CloseComponent();
}

DotNet6.RC1

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✔️ Resolution: DuplicateResolved as a duplicate of another issueStatus: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions