[Hot Reload with dotnet watch][Unstable] Create a 11.0 Blazor Web App project, update and save the .css file, and then refresh the browser, the project will revert to its previous state
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
**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**
1. Clean Win11 x64 25h2 ENU
2. Install the .NET 11.0 preview 2 SDK from corhont build
3. Add feed
**Platform**
- [x] Windows
- [ ] macOS
- [ ] Linux
**Repro Steps**
1. Open a normal Command Prompt
2. 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
```
3. Press `Ctrl + C` to stop the `dotnet watch`
4. Then run it using `dotnet watch` again
5. Open Components/Layout/MainLayout.razor.css in Notepad, update the `.page` selector:
```
.page {
position: relative;
display: flex;
flex-direction: column;
+ background-color: orange;
```
4. Save the change, the browser update to display the color
5. Refresh the browser, view the browser
**Actual Result**
The page will return to the previous state after refresh the browser.

**Note:**
1. This issue doesn't repro with 10.0.201 SDK(March Servicing build) and 10.0.300-preview build.
2. This issue doesn't repro Blazor WebAssembly Standalone project.
3. This issue also repro on Blazor web app for Wasm project.
4. This issue also repro on wwwroot/app.css file, does not repro on .razor file.
**Error Log**
Contributor guide
Assessment
This issue has not been assessed yet.