Skip to content

Blazor Interactive Server with Individual Accounts lacks Bootstrap when sample pages are excluded #63275

@mahdiyar021

Description

@mahdiyar021

Summary
When creating a Blazor Web App in Interactive Server mode with authentication set to Individual Accounts and opting out of the sample pages, the project does not include Bootstrap. As a result, the authentication UI (login/register/manage) renders unstyled, despite the template assuming Bootstrap-based styles.

Steps to reproduce

  • Create project (CLI):
    dotnet new blazor --interactivity Server --auth Individual --empty true -o BlazorAuthNoSamples
    Run the app:
cd BlazorAuthNoSamples
dotnet run
  • Navigate:
  • Go to the login or register pages.
  • Observe:
  • Authentication pages are unstyled (no Bootstrap classes rendered as expected).

Expected behavior

  • Bootstrap included: The template should include Bootstrap (CSS link and, optionally, JS) when authentication is set to Individual Accounts, even if sample pages are excluded.
  • Styled auth UI: Identity/auth components should render with expected Bootstrap styling out of the box.

Actual behavior

  • No Bootstrap reference: The generated project omits Bootstrap when --empty true (or “Do not include sample pages”) is selected.
  • Unstyled pages: Authentication-related pages render without styling.

Environment

  • .NET SDK: [e.g., 8.0.x or 9.0.x]
  • Template: Blazor Web App
  • Interactivity: Server
  • Auth: Individual
  • Include sample pages: No (--empty true)
  • OS: Windows 11 (build/version)
  • IDE: [e.g., Visual Studio 2022 17.x]

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-identityIncludes: Identity and providers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions