-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
dotnet watch will update the browser when the project itself changes, but not when a dependent project changes (Razor class library).
VS hot reload doesn't update the browser at all.
Expected Behavior
UI should update.
Steps To Reproduce
- New Blazor WASM solution + app
- Create a new Razor Class Library
- Add a reference from the WASM app to the class library
- Add
Component1
toIndex.razor
Scenario 1: dotnet watch
- From a command prompt run
dotnet watch --project .\WasmApp\WaspApp.csproj
- Edit the text in
Index.razor
and save - Edit the text in
Component1.razor
and save
Expected: Both changes should update the UI
Actual: Only changes to Index.razor
update the UI
Scenario 2: Hot reload
- Run the app
- Ensure Hot Reload is enabled, and set to trigger when a file is saved
- Edit the text in
Index.razor
and save - Edit the text in
Component1.razor
and save
Expected: Both changes should update the UI
Actual: No changes are seen unless the page is refreshed in the browser.
Exceptions (if any)
No response
.NET Version
8.0.100-preview.5.23303.2
Anything else?
dotnet --version
8.0.100-preview.5.23303.2
C:\Users\Admin>dotnet --info
.NET SDK:
Version: 8.0.100-preview.5.23303.2
Commit: 3fe444af72
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22621
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.100-preview.5.23303.2\
.NET workloads installed:
There are no installed workloads to display.
Host:
Version: 8.0.0-preview.5.23280.8
Architecture: x64
Commit: bc78804f5d
.NET SDKs installed:
6.0.408 [C:\Program Files\dotnet\sdk]
7.0.302 [C:\Program Files\dotnet\sdk]
7.0.400-preview.23274.1 [C:\Program Files\dotnet\sdk]
8.0.100-preview.5.23303.2 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0-preview.5.23302.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0-preview.5.23280.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.0-preview.5.23302.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found