Skip to content

CLI Hot reload Blazor wasm just doesn't work. #40587

Closed
dotnet/sdk
#27699
@ziaulhasanhamim

Description

@ziaulhasanhamim

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

There were many issues about dotnet watch not working with blazor wasm. #38561, #36723, #40091 etc. It was mentioned there that the issue is fixed in .net 6.0.2. But it's not. The issue is there still. Furthermore, there are no responses now on those issues when it was informed that in .net6.0.2 it's not working. Very disappointing behavior.

dotnet watch --verbose logs

watch : Project supports hot reload and was configured to run with the default run-command. Watching with hot-reload
watch : Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload. Press "Ctrl + R" to restart.
watch : Building...
watch : Started 'C:\Program Files\dotnet\dotnet.exe' '' with process id 9496
  Determining projects to restore...
  Restored C:\Users\ziaul\Sources\BlazorWasmApp\BlazorWasmApp.csproj (in 1.39 sec).
  BlazorWasmApp -> C:\Users\ziaul\Sources\BlazorWasmApp\bin\Debug\net6.0\BlazorWasmApp.dll
  BlazorWasmApp (Blazor output) -> C:\Users\ziaul\Sources\BlazorWasmApp\bin\Debug\net6.0\wwwroot
watch : Process id 9496 ran for 27116ms
watch : Running MSBuild target 'GenerateWatchList' on 'C:\Users\ziaul\Sources\BlazorWasmApp\BlazorWasmApp.csproj'
watch : Started 'C:\Program Files\dotnet\dotnet.exe' '' with process id 9176
watch : Process id 9176 ran for 3657ms
watch : Watching 28 file(s) for changes
watch : dotnet-watch is configured to launch a browser on ASP.NET Core application startup.
watch : Configuring the app to use browser-refresh middleware.
watch : Refresh server running at wss://localhost:58192,ws://localhost:58193.
watch : HotReloadProfile: BlazorWebAssembly.
watch : Waiting for a browser to connect
watch : Started 'dotnet' '"C:\Users\ziaul\.nuget\packages\microsoft.aspnetcore.components.webassembly.devserver\6.0.2\build\../tools/blazor-devserver.dll" --applicationpath "C:\Users\ziaul\Sources\BlazorWasmApp\bin\Debug\net6.0\BlazorWasmApp.dll"' with process id 8976
watch : Running dotnet with the following arguments: run
watch : Started
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: https://localhost:7020
watch : Launching browser.
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://localhost:5152
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
      Content root path: C:\Users\ziaul\Sources\BlazorWasmApp
watch : Hot reload capabilities: .
watch : File changed: C:\Users\ziaul\Sources\BlazorWasmApp\Pages\Index.razor.
watch : No deltas modified. Applying changes to clear diagnostics.
watch : Received 1 from browser in [Count: 1, MessageType: Binary, EndOfMessage: True].
watch : No hot reload changes to apply.
watch : Hot reload change handled in 6599.4355ms.

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

6.0.200

Anything else?

No response

Metadata

Metadata

Assignees

Labels

Priority:2Work that is important, but not critical for the releasearea-blazorIncludes: Blazor, Razor Componentsarea-commandlinetoolsIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIfeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssemblyfeature-dotnetwatchThis issue is related to the dotnet-watch command-line tool (now external)feature-hot-reloadThis issue is related to the Hot Reload feaatureinvestigate

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions