Skip to content

Blazor Web App template: The Layout folder (namespace) isn't present in the _Imports file #52478

Open
@guardrex

Description

@guardrex

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

In prior releases (Blazor Server), the Shared folder namespace was placed in the _Imports file. This release for BWAs, only the Components folder is present. This results in the incongruous situation where "Layout." has to be supplied on DefaultLayout ...

<RouteView RouteData="@routeData" DefaultLayout="@typeof(Layout.MainLayout)" />

... which wasn't required before and still isn't required for Blazor WebAssembly apps. It's breaking the docs and requiring further versioned content.

Describe the solution you'd like

Consider adding it to the _Imports file ...

@using BlazorWeb_CSharp.Components.Layout

Remove "Layout." from the two DefaultLayout params in Routes.razor.

Additional context

BTW .... It seems like if the components folder is plural (Components) and the routable components folder is plural (Pages) that the layout folder name should also be plural (Layouts).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority:2Work that is important, but not critical for the releasearea-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.feature-templates

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions