The value of AllowRecompilingViewsOnFileChange determines whether to watch for file changes (on disk) or not. When it's true, MVC will watch for changes to cshtml files.
By default, the value is true for ASP.Net Core 2.1 or earlier, as well as the Development environment of later versions. Otherwise the value is false.