Skip to content

.NET 6 Blazor Hot Reload fails depending on the port specified for the application Url #38029

Open
@vsfeedback

Description

@vsfeedback

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Author: Migration Bot 🤖The issue was created by a issue mover bot. The author may not be the actual author.area-commandlinetoolsIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIbugThis issue describes a behavior which is not expected - a bug.feature-dotnetwatchThis issue is related to the dotnet-watch command-line tool (now external)feature-hot-reloadThis issue is related to the Hot Reload feaature

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions