-
Notifications
You must be signed in to change notification settings - Fork 6k
Update 'dotnet watch' doc to detail new .NET 7 behavior #31949
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
Comments
cc @Mikejo5000 |
@tdykstra Thanks. I'll do a pass on the Hot Reload doc in the next Sprint, and likely call this out. |
Got this error in .NET 7 ASP.NET MVC project. Spent a few hours and finally found this issue, so thanks @DamianEdwards for this.
The information on both these links are outdated:
Neither of these links solve the problem. Or even better to put it in
|
Should we still disable |
@changhuixu Yes, you still need to disable response compression, or manually add the browser refresh JavaScript reference to the app's pages, as explained in the dotnet watch article. |
I'm not using response compression, and see a similar warning:
This is the only issue I could find on this matter. Are they related? And if so, do I use the same approach as above? |
This error message is outside the scope of this article, but the message itself recommends the same resolution, so that would be worth a try. |
@MackinnonBuck
The browser refresh middleware used by
dotnet watch
and Visual Studio to auto-refresh the browser when code changes are detected was updated in .NET 7 to make it more resilient to failures under certain app configurations, including when response compression is enabled.In these cases it will log a warning to the application output like the following:
We should update this doc (and perhaps the VS Hot Reload docs too) with the details of this change, including that folks can manually add the browser refresh JavaScript reference to their app's pages to get browser refresh working, e.g.:
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
Associated WorkItem - 34608
The text was updated successfully, but these errors were encountered: