-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
dotnet watch hot reloads for all non-code files - potential infinite reload loop #44910
Comments
I had similar issue to exclude some directory from dotnet watch but it didn't work |
This is frustrating, particularly with webpack hot reload + emit files, where every time you save a js file, it emits hot reload chunk + json, which are added to the watch. It really slows down the reload after a couple of file changes and hogs CPU 😬 |
I'm still not using .NET 9, 3 months after its release, because of this issue. I tried 9.0.102, which did not resolve the problem. |
I'm considering every day if it is not worth it to downgrade back to .NET 8 every time the dotnet watch has some issue. |
4 months after release and I'm still using .NET 8 because of this issue. |
Starting with 9.0.200 dotnet-watch ignores files in output directories (bin, obj) and in directories starting with Further customization of ignored files is tracked by issue #45539.
We do not know whether other files that are being added have anything to do with building until we evaluate the project. |
The issue is dotnet watch now watches a lot more than it used to. It feels much more like opt-out configuration is required than opt-in. Since the opt-out configuration does not work today I cannot use dotnet watch in .NET 9. |
@seangwright I'm not sure I understand why dotnet-watch reporting "No hot reload changes to apply" is a blocker. Could you elaborate? |
Describe the bug
I'm running
dotnet watch
in the directory of an ASP.NET Core 8.0 application using the .NET 9 SDK.My app generates non-code files in the
~\App_Data
directory as part of a background process (this includes binary, xml, json, and other non code files). When this happens,dotnet watch
records the files being created or modified and will even hot reloadFor example
I have tried ignoring specific files but none of the recommendations work. Even if they did work, there's no reason I should have to explicitly ignore some
.txt
files inApp_Data
to keep my app from reloading.To Reproduce
dotnet watch
App_Data\Test
becausedotnet watch
keeps reloading the pageExceptions (if any)
dotnet watch
should not process files that have nothing to do with rebuilding or hot-reloading my .NET application.Further technical details
This bug negatively impacts any project that generates files in the project during runtime - ASPNET Core apps with client assets, files uploaded/imported to the file system, log files, ect...
The text was updated successfully, but these errors were encountered: