-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Namespace mismatched compilation error to the generic type component event arguments #12116
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
Labels
area-blazor
Includes: Blazor, Razor Components
bug
This issue describes a behavior which is not expected - a bug.
Done
This issue has been fixed
Milestone
Comments
@ajithr Thanks, was having trouble reproducing exactly what caused the error |
Thanks for all the details, @ajithr. |
pranavkm
added a commit
to dotnet/razor
that referenced
this issue
Aug 8, 2019
The code-generated TypeInference type resides in a custom namespace. Any types that it refers to in user code must be qualified using the "global::" prefix to avoid type \ namespace conflicts. Fixes dotnet/aspnetcore#12116
pranavkm
added a commit
to dotnet/razor
that referenced
this issue
Aug 8, 2019
The code-generated TypeInference type resides in a custom namespace. Any types that it refers to in user code must be qualified using the "global::" prefix to avoid type \ namespace conflicts. Fixes dotnet/aspnetcore#12116
pranavkm
added a commit
to dotnet/razor
that referenced
this issue
Aug 12, 2019
The code-generated TypeInference type resides in a custom namespace. Any types that it refers to in user code must be qualified using the "global::" prefix to avoid type \ namespace conflicts. Fixes dotnet/aspnetcore#12116
pranavkm
added a commit
to dotnet/razor
that referenced
this issue
Aug 13, 2019
The code-generated TypeInference type resides in a custom namespace. Any types that it refers to in user code must be qualified using the "global::" prefix to avoid type \ namespace conflicts. Fixes dotnet/aspnetcore#12116
Possibly somewhat related to #13220 ? |
JunTaoLuo
pushed a commit
that referenced
this issue
May 7, 2020
The code-generated TypeInference type resides in a custom namespace. Any types that it refers to in user code must be qualified using the "global::" prefix to avoid type \ namespace conflicts. Fixes #12116
JunTaoLuo
referenced
this issue
May 17, 2020
…t/razor#946) The code-generated TypeInference type resides in a custom namespace. Any types that it refers to in user code must be qualified using the "global::" prefix to avoid type \ namespace conflicts. Fixes https://github.com/aspnet/AspNetCore/issues/12116\n\nCommit migrated from dotnet/razor@f0e09e4
dougbu
referenced
this issue
in dougbu/razor-compiler
Nov 17, 2021
…t/razor#946) The code-generated TypeInference type resides in a custom namespace. Any types that it refers to in user code must be qualified using the "global::" prefix to avoid type \ namespace conflicts. Fixes https://github.com/aspnet/AspNetCore/issues/12116\n\nCommit migrated from dotnet/razor@f0e09e4 Commit migrated from dotnet/aspnetcore@32196f8023a1
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.
Done
This issue has been fixed
Describe the bug
When using generic type to the Blazor component, the namespace is mismatched for EventCallback method arguments and throws compilation error.
MyGenComponent.razor:
Models.cs
Index.razor:
To Reproduce
Steps to reproduce the behavior:
1>obj\Debug\netcoreapp3.0\Razor\Pages\Index.razor.g.cs(103,295,103,301): error CS0234: The type or namespace name 'Shared' does not exist in the namespace '__Blazor.GenericTypeBlazor' (are you missing an assembly reference?)
Expected behavior
The EventCallback should be work with both generic type and non generic type arguments when using
@typeparam
in the Blazor component.Screenshots
Additional context
The text was updated successfully, but these errors were encountered: