When using Hot Reload in the .NET CLI...
$ dotnet watch
watch : Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload. Press "Ctrl + R" to restart.
watch : Building...
...
watch : Started
... any rude edit leads to the following prompt:
watch : Unable to apply hot reload because of a rude edit.
watch : Do you want to restart your app - Yes (y) / No (n) / Always (a) / Never (v)?
Is there any way to tell the CLI to default to "Always"? Something like dotnet watch --always-restart
?
(asking because I'd like to run dotnet watch
in a container)
set DOTNET_WATCH_RESTART_ON_RUDE_EDIT=1
in windows. I at least have option to say always-reload, but I can't get the default behavior of mydotnet watch
to be always-reload. Anyone know what I might be doing wrong? My machine doesn't have anexport
cmd (win11 cmder/cmd). – Chil