This feature was working by default in ASP.NET Core 2.1 but not with the currently latest 2.2.
I've just created two basic ASP.NET Core API projects in Visual Studio 2017 (Community Edition), one with the 2.1 and other with 2.2 template. Then I run both projects with Ctrl + F5 (eg. without debugging). When I go to the /api/values url for each of them I get the default JSON. So far so good.
Now when I change ValuesController.cs in 2.1 project and hit refresh in the browser I see that it takes some time to load because web server detected changes and is rebuilding the project, and then I get the new JSON values. However, when I repeat this same process for 2.2 and hit refresh in the browser I get old values without delay (eg. no project building took place).
So how do I enable this feature in 2.2?
dotnet watch run
– Same thing as in 2.1. There was nothing in 2.1 that did this automatically. And you certainly don’t want to rebuild the project when you hit refresh in the browser! You only want to rebuild when you make an actual change in the source. – Lick