Skip to content

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

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

Closed
kefyru opened this issue Oct 12, 2021 · 1 comment
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved

Comments

@kefyru
Copy link

kefyru commented Oct 12, 2021

<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

@javiercn javiercn added the area-blazor Includes: Blazor, Razor Components label Oct 12, 2021
@mkArtakMSFT mkArtakMSFT added the bug This issue describes a behavior which is not expected - a bug. label Oct 12, 2021
@mkArtakMSFT mkArtakMSFT added this to the .NET 7 Planning milestone Oct 12, 2021
@TanayParikh
Copy link
Contributor

TanayParikh commented Oct 20, 2021

Thanks for reporting, closing this out as duplicate of: #18757

@TanayParikh TanayParikh added the ✔️ Resolution: Duplicate Resolved as a duplicate of another issue label Oct 20, 2021
@ghost ghost added the Status: Resolved label Oct 20, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved
Projects
None yet
Development

No branches or pull requests

4 participants