[Blazor - ASP.NET Core] Resolve Namespace conflits in the BuildRenderTree with the "global::" keyword #13220
Labels
area-blazor
Includes: Blazor, Razor Components
bug
This issue describes a behavior which is not expected - a bug.
Milestone
Hi guys!
Description:
I have an issue with the generated BuildRenderTree functions of my razor components.
The issue is the following: I have multiple namespaces containing the same segments (this naming convention is company policy (customer censored, this is a demo project, not a production one.)):
I am using the default generated server-side template:
I get the following error:
Possible fix:
The namespaces in the generated component code should use the "global::" contextual keyword (like the old designer files did).
The following temporary fix solves the problem until the next cleaning (build works fine, rebuild re-generates the wrong code):
Edit:
The dotnet/razor#7670 enhancement could also provide a workaround.
The text was updated successfully, but these errors were encountered: