简体   繁体   中英

Asp.Net 5 project hosting

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?

Ok, here is how I managed it:

  1. Installed KVM ( http://www.tugberkugurlu.com/archive/getting-started-with-asp-net-vnext-by-setting-up-the-environment-from-scratch )
  2. Added "nodemon": "1.2.1" to package.json and restored nodemon package
  3. 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

  4. 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

  5. Refresh the browser

Hope this helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM