Reputation: 59
I'm trying to host a web application created in VS 2015 Preview with Asp.Net 5 Starter Web. I set Debug target to Web, I hit F5 and klr console is starting and and I am able to load application in browser, at specified port.
The problem is, when I change something in code (in a controller, or even in a cshtml view) and save, the klr server stops and console closes. Is this the intended behavior? Or should I be able to save and refresh, as Roslyn compiler works?
Upvotes: 1
Views: 325
Reputation: 59
Ok, here is how I managed it:
Opened cmd, go to app directory and type nodemon --exec "K.cmd web" -e cs,json (-e tells nodemon which type of files to watch - I don't want all kind of files, since js, css etc are reloaded on refresh anyway).
X:\Support\AspNet5\Test>nodemon --exec "K.cmd web" -e cs,json
18 Dec 14:57:25 - [nodemon] v1.2.1
18 Dec 14:57:25 - [nodemon] to restart at any time, enter rs
18 Dec 14:57:25 - [nodemon] watching: .
18 Dec 14:57:25 - [nodemon] starting K.cmd web
[INFORMATION:Microsoft.AspNet.Server.WebListener.MessagePump] Start
Started
Edit a cs file - looking back to cmd window
18 Dec 14:59:40 - [nodemon] restarting due to changes...
[INFORMATION:Microsoft.AspNet.Server.WebListener.MessagePump] Stop
18 Dec 14:59:41 - [nodemon] starting K.cmd web
[INFORMATION:Microsoft.AspNet.Server.WebListener.MessagePump] Start
Started
Refresh the browser
Hope this helps
Upvotes: 2