Skip to content

Hot reloading fails after the second change of a razor file #59027

@akorchev

Description

@akorchev

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Making a change to a .razor file no longer applies consistently after upgrading to .NET 9. I am using macOS 15.0.1 on a MacBook Pro M1 (could be related).

Expected Behavior

All changes should be hot-reloaded, not just the first one. This used to work in .NET 8.

Steps To Reproduce

  1. Create a new app by running dotnet new blazor -int Auto -o Blazor9Auto in some directory (from command prompt).
  2. Run the application dotnet watch --project Blazor9Auto/Blazor9Auto.csproj This should open the browser.
  3. Open Blazor9Auto/Components/Pages/Home.razor and change it somehow then save it. Make a few changes and save a few times.
    Image

Exceptions (if any)

Change failed to apply (error code: '00-00-00-00-00'). Further changes won't be applied to this process.

.NET Version

9.0.100

Anything else?

ASP.NET Core version:

9.0.0

The IDE (VS / VS Code/ VS4Mac) you're running on, and its version:

Tested with VS Code, vim. The editor doesn't seem to matter.

Include the output of dotnet --info:

.NET SDK:
 Version:           9.0.100
 Commit:            59db016f11
 Workload version:  9.0.100-manifests.3068a692
 MSBuild version:   17.12.7+5b8665660

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  15.0
 OS Platform: Darwin
 RID:         osx-arm64
 Base Path:   /usr/local/share/dotnet/sdk/9.0.100/

.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.

Host:
  Version:      9.0.0
  Architecture: arm64
  Commit:       9d5a6a9aa4

.NET SDKs installed:
  6.0.406 [/usr/local/share/dotnet/sdk]
  7.0.403 [/usr/local/share/dotnet/sdk]
  8.0.403 [/usr/local/share/dotnet/sdk]
  9.0.100 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.14 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.13 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.10 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 9.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.14 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.10 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Metadata

Metadata

Assignees

Labels

area-blazorIncludes: Blazor, Razor Componentsfeature-hot-reloadThis issue is related to the Hot Reload feaature

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions