views:

171

answers:

2

I'm publishing an ASP.Net MVC as an IIS7 site on my local workstation. Is it possible to get IIS7 to re-compile the project when needed?

A: 

Files published to IIS shouldn't be source code that needs to be re-compiled.

You could search for "automated build process", "continuous integration" or MSBuild if you want to set up a system that re-compiles and then publishes your site for you whenever you change the source code.

Dennis Palmer
I just want an streamlined way to develop. To code, try, code, try.
J. Pablo Fernández
Are you using Visual Studio? Just edit code and hit F5 key. It seems like you're making it more complex than it needs to be.
Dennis Palmer
The problem with just hitting F5 is that VS gets locked until I stop, I cannot edit code and re-try. I have to stop, edit, re-try.
J. Pablo Fernández
OK. I see what you're asking now. You might want to edit your question to include that last comment.
Dennis Palmer
A: 

No, IIS7 can't do that. There's a bunch of alternatives, I think from easiest to more complicated:

  1. As mentioned: Just use Visual Studio to develop and test by hitting F5 and using VS.net built-in web server for asp.net
  2. Point your IIS web site to where your site code is. When you compile your project the IIS web site should also be compiled since it's pointing to the same code as you development files. This is similar to what you are doing but there is no need to actually publish the site.
  3. Use something like CruiseControl.net and nant to automatically compile and deploy your project to IIS at intervals or as needed.
metanaito