Skip to content

Change applied to Blazor WebAssembly app using .NET Hot Reload don't show up after adding binding code #34446

@danroth27

Description

@danroth27

Repro steps:

  • Install .NET 6 Preview 7
  • dotnet new blazorwasm -ho -o BlazorApp
  • cd BlazorApp/Server
  • dotnet watch
  • Update Index.razor to add the following simple binding code:
<input @bind="text" />
<p>@text</p>

@code {
  string? text;
}
  • Wait for the app to restart
  • Update the Title attribute of the SurveyPrompt component to change the attribute value to something else.

Expected result:

  • The change is applied to the running app and shows up in the survey prompt in the browser

Actual result:

  • dotnet watch says the change was successfully applied, but the change doesn't show up in the browser. Navigating to a different tab and back again to trigger a rerender doesn't help, neither does refreshing the browser.
  • If you make another simple change, like updating the attribute value again or changing some HTML markup, dotnet watch says that a rude edit has occurred.
  • If you remove the input and data binding code, then hot reload seems to work fine.

@pranavkm @lambdageek

Metadata

Metadata

Assignees

Labels

DoneThis issue has been fixedExternalThis is an issue in a component not contained in this repository. It is open for tracking purposes.area-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.feature-hot-reloadThis issue is related to the Hot Reload feaature

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions