.NET 6 Blazor Hot Reload fails depending on the port specified for the application Url
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/NET-6-Blazor-Hot-Reload-fails-depending/1554207)._
---
[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:
``` xml
"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)
Contributor guide
Assessment
This issue has not been assessed yet.