Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET Hot Reload not working with .NET 6 Preview 7 and dotnet watch #34440

Closed
danroth27 opened this issue Jul 16, 2021 · 4 comments
Closed

.NET Hot Reload not working with .NET 6 Preview 7 and dotnet watch #34440

danroth27 opened this issue Jul 16, 2021 · 4 comments
Assignees
Labels
area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI feature-dotnetwatch This issue is related to the dotnet-watch command-line tool (now external) feature-hot-reload This issue is related to the Hot Reload feaature investigate
Milestone

Comments

@danroth27
Copy link
Member

Repro steps:

  • Install .NET 6 Preview 7 (6.0.100-preview.7.21366.53)
  • dotnet new blazorserver -o BlazorApp
  • cd BlazorApp
  • dotnet watch
  • Edit Pages\Index.razor

Expected result: UI updates with changes

Actual result:

  • dotnet watch says the change was applied, and the browser flashes with the hot reload overlay, but the UI isn't updated.

@pranavkm

@mkArtakMSFT mkArtakMSFT added area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI feature-dotnetwatch This issue is related to the dotnet-watch command-line tool (now external) feature-hot-reload This issue is related to the Hot Reload feaature investigate labels Jul 16, 2021
@mkArtakMSFT mkArtakMSFT added this to the 6.0-preview7 milestone Jul 16, 2021
@pranavkm
Copy link
Contributor

@mikem8361 it looks like MetadataUpdater.IsSupported returns false when running under dotnet-watch. Does not seem to be the case for Mono / WebAssembly. Here's a simple repro:

  • dotnet new console
  • Edit Program.cs to print Console.WriteLine(System.Reflection.Metadata.MetadataUpdater.IsSupported);
  • dotnet watch

This prints False and causes some of our wire-up to fail. Could you look?

@mikem8361
Copy link
Member

Fixed in PR dotnet/runtime#55874

@pranavkm
Copy link
Contributor

Can we port the fix to preview7?

@campersau
Copy link
Contributor

Backport: dotnet/runtime#55876

stephentoub pushed a commit to dotnet/runtime that referenced this issue Jul 18, 2021
Issue: dotnet/aspnetcore#34440

Co-authored-by: Mike McLaughlin <mikem@microsoft.com>
@ghost ghost locked as resolved and limited conversation to collaborators Aug 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI feature-dotnetwatch This issue is related to the dotnet-watch command-line tool (now external) feature-hot-reload This issue is related to the Hot Reload feaature investigate
Projects
None yet
Development

No branches or pull requests

5 participants