![]() Essentially it’s saying “Do a watch, and when something changes, do ‘this’ thing” which in our case is the run command. “dotnet run -f net451” to specify the framework), this will still work using the watch command. ![]() Note that if you previously have had to run the “dotnet run” command with other flags (e.g. ![]() Open a command prompt in your project directory, a terminal in VS Code, or even the Package Manager Console in Visual Studio and run the following command : dotnet watch run The tooling can be a little finicky with large projects so it’s easier to get up and running with something small, then take what you’ve learned onto something a little larger.įor this demo, I have a simple controller that has a get method that returns a string value. I highly recommend creating a simple ASP.NET Core project to run through this tutorial with. If you are used to watches in other languages/tooling (Especially task runners like Gulp), then you will know how much of a boost watches are to productivity. The latter can be very annoying when all you are trying to do is do a simple one line fix. With it, it allows you to have a “live reload” of your ASP.NET Core site running without having to either run the “dotnet run” command, or worse do the “Stop the process in Visual Studio. NET Core CLI is the “dotnet watch” command. But this is still a killer feature and should be used far more often! The original article was written in pre 1.0 days and is no longer relevant. ![]() NOTE : This post was initially written in early 2017 (!!!) but has now been completely revamped in 2020 to be up to date with. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |