Live coding using ASP.NET 5 and DNX

Live coding using ASP.NET 5 and DNX

Coding in ASP.NET 5 just became a lot quicker. A change in a view will be reflected as soon as you hit F5, now you can have the same magic with controllers or any other compiled code in your project as soon as you save your changes.

Once you have ASP.NET 5 and the DNVM installed (see here for instructions on installing on Linux) you can install the dnx-watcher which wraps dnx in a file system watcher.
It can be installed by running the below command

dnu commands install Microsoft.Dnx.Watcher

Now instead of running dnx kestrel to start the Kestrel sever, run dnx-watch kestrel instead. It will now watch your project directory for changes; make a change and dnx-watch will kill and restart the server, compiling your changes along the way.

Hit F5 and see your changes in real time rather than having to restart kestrel manually whenever you want to see a change.