views:

184

answers:

3

I've written a site for my summer internship using ASP.NET MVC. The progress is going well but one thing I have found painful is deployments. Particularly, because we have frequent deployments and I've been doing them by hand.

I'm looking for sort of the "standard" .NET deployment tool that can be utilized with an ASP.NET MVC project to automate our deployment process.

Some things I would like the tool to be able to do (that I do manually now):

  • Set compile mode to "Release"
  • Publish my ASP.NET MVC Web Application project
  • Ensure debug mode = "Off" in my Web Config
  • Change the connection strings for our database from dev db to prod db's info
  • Transfer the Website to the web server
  • Ideally, it would be nice if it stopped the IIS site and replaced the existing site with the new files, then restarted it.

Given sort of these soft requirements, what tool would you suggest I use to tackle this problem? I'm using II7 if it matters.

+5  A: 

I would use NAnt. You can have it:

  • Retrieve the code from your source code repository (it has plug-ins for the vast majority of them).
  • It can compile the code either directly or use your solution file and command line options to start vstudio. Look at the command line options and you can tell it to do a rebuild and to change the mode to Release.
  • It has XML commands (XMLPOKE) that will let you easily change the debug mode to off as part of the deployment
  • Copying files is easy (it has lots of ways to do this).

And, you don't need to stop the IIS site. You can simply add an app_offline.htm file (double-check my file name). When the site is hit, this page will automatically display. So have the NAnt script deploy the file as it's first step and remove it as it's last step.

Jeff Siver
+2  A: 

Check out the Web Deployment Project. It is able to do most of what you request. I used it for the building part of deployment. I am not shure about the copying to iis and restart IIS-part.

Malcolm Frexner
+1 big fan of this. have been using it for a while with 'great success' :)
Pure.Krome
A: 

You can try InstallAce from www.installace.com that takes care of most of deployment scenarios of Web Applications including build packaging, Scripting tasks, IIS or SQL tasks, file distribution and server side config files updation.

Mark Ringer