sdk icon indicating copy to clipboard operation
sdk copied to clipboard

[Aspire]: dotnet watch crashes after a few edits using Visual Studio

Open davidfowl opened this issue 1 year ago • 1 comments

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 watch on Mongo.AppHost (you'll get 2 browser popups, one for the dashboard and one for the app)
  • Go to Mongo.ApiService/Program.cs line 18 and change entries to entries2
  • The entire process gets recycled instead of using hot reload (maybe rude edit detection?)
  • Go to Mongo.ApiService/Program.cs line 18 and change entries2 back to entries
  • Watch it crash:

Video:

https://github.com/user-attachments/assets/59510d0e-11bf-4835-ba53-9050d5f314b1

davidfowl avatar Oct 19 '24 05:10 davidfowl

Related https://github.com/dotnet/sdk/issues/44260 (seems like it repros on 9.0.100 as well)

davidfowl avatar Oct 19 '24 06:10 davidfowl

@tmat did you get a chance to look at this?

davidfowl avatar Jan 15 '25 07:01 davidfowl

@davidfowl It's having some issues with browser refresh but is applying changes correctly now.

tmat avatar Jan 15 '25 15:01 tmat

Unable to repro anymore, assume fixed

davidfowl avatar Jan 16 '25 01:01 davidfowl