简体   繁体   中英

How to test multiple ASP.NET 5 projects in IIS without publishing?

I like the way doing test/debug in previous versions - host the projects in IIS, rebuild, refresh and you see the changes. Attach the w3p process to VS whenever you need debug.

It seems the new ASP.NET 5 doesn't allow me to do this easily. It is tedious to publish a project to IIS to see the changes, especially with multiple projects. What is the correct way to host multiple projects in a continuously running process so it can be built and tested rapidly? Assume you have 1 MVC and 6 webapi apps communicating with each other.

This should work, if you setup the webs in IIS manually and if yo map those webs to to the publish output folders (\\artifacts\\bin...\\Release\\PublishOutput)

EDITED:

If this is done, add an post build event to the project.json:

"scripts": {
  "postbuild": [ "dnu publish"],
  "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
}

Maybe you need to install bower and gulp on your machine:

npm install -g bower
npm install -g gulp

If the build is done, you'll find the published output in the artifacts.

Hope this helps a little bit.

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