REGRESSION INFO Works well in 10.0.201 and 10.0.300-preview SDK
Also repro in .NET 11.0 preview 1 SDK
INSTALL STEPS
- Clean Win11 x64 25h2 ENU
- Install the .NET 11.0 preview 2 SDK from corhont build
- Add feed
Platform
Repro Steps
- Open a normal Command Prompt
- Create a Blazor Web App for Server project, and run it using
dotnet watch
dotnet new blazor -int Server -o MyBlazorServerApp
cd MyBlazorServerApp
dotnet watch
- Press
Ctrl + C to stop the dotnet watch
- Then run it using
dotnet watch again
- Open Components/Layout/MainLayout.razor.css in Notepad, update the
.page selector:
.page {
position: relative;
display: flex;
flex-direction: column;
+ background-color: orange;
- Save the change, the browser update to display the color
- Refresh the browser, view the browser
Actual Result
The page will return to the previous state after refresh the browser.

Note:
- This issue doesn't repro with 10.0.201 SDK(March Servicing build) and 10.0.300-preview build.
- This issue doesn't repro Blazor WebAssembly Standalone project.
- This issue also repro on Blazor web app for Wasm project.
- This issue also repro on wwwroot/app.css file, does not repro on .razor file.
Error Log