I use the command dotnet watch run
while developing dotnet core applications. However, I want the watcher only to watch if the .dll file in the bin folder has changed, and only then should it rebuild the application. In other words, I want the dotnet console app to re-run when I build my project/solution.
I tried to override the default behaviour of the watcher in the .csproj to accomplish this, as stated here.
<ItemGroup>
<Watch Include = "**/*.dll">
<Watch Exclude = "**/*.cs">
<Watch Exclude = "**/*.resx">
<Watch Exclude = "*.csprj">
</ItemGroup
but it doesn't work. Could anyone help me with this?
Thanks