dotnet / dotnet/aspnetcore

[WebToolsE2E] Blazor WebAssembly (Global) project: Page layout breaks after CSS changes and app restart.

Open
#65,738 10 comments 0 reactions 0 assignees View on GitHub
area-blazor investigate
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 5h
Merged PRs (30d)
276

Description

**REGRESSION INFO**: Not a regression, reproduced in VS 18.4.0

Doesn't repro with Blazor Server (Global)
Doesn't repro with Blazor WebAssembly (Per page/component)
Repro with Blazor Auto (Global)
Repro with hot reload disabled in VS Settings.
Doesn't repro with 'dotnet run' and 'dotnet watch'.

**INSTALL STEPS**

1. Clean Win11 x64 25h2 ENU
2. Install VS 18.5 Insiders 1 latest released version, Web workload

**REPRO STEPS**

1. Create a new 10.0 Blazor Web App ~ WebAssembly + Global project in Visual Studio.
2. Run the project.
3. Modify the MainLayout.razor.css file in the project and save the changes. E.g. Modify the background-color in line 16.
4. Stop debugging.
5. Run the project again.
6. Observe the page in the browser.

**ACTUAL**

An unhandled error has occurred. Reload doesn't work.

Image

Click "About" on the webpage.

Image

**EXPECTED**

After restarting the app, the page should load successfully and reflect the latest CSS changes.

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.