I am able to get dotnet watch working with this simple case:
while(true)
{
Thread.Sleep(1000);
F();
}
void F()
{
Console.WriteLine("a");
}
Changing "a" to "b" and saving the file (while the app is still running) does what you'd expect without need to rebuild the app.
However, in my non-trival app with thousands of lines of code (which I am upgrading from an older dotnet version build using Windows Visual Studio), every single code edit shows this message:
Do you want to restart your app - Yes (y) / No (n) / Always (a) / Never (v)?
All edits trigger this. Even extremely simple cases of functions with nothing special going on exactly like in the simple case above.
I've spent hours trying to figure out why the simple case works but my real app doesn't.
Does anyone have any ideas? For example is there a flag on dotnet watch where it will tell my why my simple code edit requires a complete rebuild?
It's ASP.NET Core, latest version. Presumably some kind of options in my project or other aspects are causing this, but the app is very complex with many dependancies. Without further information about what cases dotnet watch fails like this, I have no idea how to begin to try and simplify the app and pin it down.
TIA.
Edit: To the "user" that edited my question to remove the smile and thank you emoji: are you freaking kidding me? What petty crap. If you have an answer, please answer. Otherwise, leave it alone ehh? What harm is it? You're just IMO editing my question to give yourself points.