dotnet / dotnet/aspnetcore

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

Open
#63,275 2 comments 0 reactions 0 assignees View on GitHub
area-identity
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

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]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.