[Aspire]: dotnet watch crashes after a few edits using Visual Studio
Using this project https://github.com/dotnet/aspire/tree/main/playground/mongo/Mongo.AppHost, running dotnet watch and making 3 edits to this line https://github.com/dotnet/aspire/blob/8abcdf7c7c5e2f0ea31db330e989450c9ccb8cdc/playground/mongo/Mongo.ApiService/Program.cs#L18.
Steps (using Visual Studio)
- Set DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS=true (to work around dotnet watch swallowing the logs and dashboard token)
- Run
dotnet watchon Mongo.AppHost (you'll get 2 browser popups, one for the dashboard and one for the app) - Go to
Mongo.ApiService/Program.csline 18 and changeentriestoentries2 - The entire process gets recycled instead of using hot reload (maybe rude edit detection?)
- Go to
Mongo.ApiService/Program.csline 18 and changeentries2back toentries - Watch it crash:
Video:
https://github.com/user-attachments/assets/59510d0e-11bf-4835-ba53-9050d5f314b1
Related https://github.com/dotnet/sdk/issues/44260 (seems like it repros on 9.0.100 as well)
@tmat did you get a chance to look at this?
@davidfowl It's having some issues with browser refresh but is applying changes correctly now.
Unable to repro anymore, assume fixed