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 6 Blazor Hot Reload fails depending on the port specified for the application Url #38029

Open
vsfeedback opened this issue Nov 2, 2021 · 3 comments
Labels
area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI Author: Migration Bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author. bug This issue describes a behavior which is not expected - a bug. 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
Milestone

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work]
Using RC2 of .NET 6 I created a brand new Blazor project.

From a terminal I then launched the application using dotnet watch.

However, when I subsequently changed a .razor file, the terminal reported that the file had changed but then silently failed; no hot reload occurred.

Eventually I had to cancel the process (CTRL + C).

After trying various things to diagnose the issue I eventually tried changing the port in launchSettings.json.

When spinning up the project it had been assigned ports 7073 and 5073:

  "profiles": {
    "TailwindStarter": {
      ...      
      "applicationUrl": "https://localhost:7073;http://localhost:5073",
      ...
    },

I modified this to good old 5001 (for https) and tried dotnet watch again.

    "TailwindStarter": {
      ...      
      "applicationUrl": "https://localhost:5001;http://localhost:5073",
      ...
    },

Tried running it again and it worked!

watch : File changed: D:\Code\TailwindStarter\Pages\Index.razor.
watch : Hot reload of changes succeeded.


Original Comments

Feedback Bot on 10/14/2021, 11:21 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

@ghost ghost added the Author: Migration Bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author. label Nov 2, 2021
@pranavkm pranavkm 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 labels Nov 2, 2021
@mkArtakMSFT mkArtakMSFT added the bug This issue describes a behavior which is not expected - a bug. label Nov 2, 2021
@mkArtakMSFT mkArtakMSFT added this to the 6.0.x milestone Nov 2, 2021
@mkArtakMSFT mkArtakMSFT modified the milestones: 6.0.x, Backlog May 23, 2022
@ghost
Copy link

ghost commented May 23, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@TanayParikh TanayParikh removed their assignment May 23, 2022
@timbze
Copy link

timbze commented Aug 4, 2022

This issue still exists in .NET 7.0 Preview 6

Simply do dotnet new blazorwasm -ho
applicationUrl http port was randomized to: 5220 (hot reload freezes for dotnet watch)
I change applicationUrl http port to 5180 and it works

@mkArtakMSFT @TanayParikh

@szalapski
Copy link

See also #45519

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI Author: Migration Bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author. bug This issue describes a behavior which is not expected - a bug. 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
Projects
None yet
Development

No branches or pull requests

8 participants
@pranavkm @szalapski @TanayParikh @vsfeedback @mkArtakMSFT @timbze and others