ASP.NET Package Web into a ZIP with the correct configuration - 4/17/2012

So, we have a customer who needs to do the following without having to have MSDEPLOY installed or used in production:
  1. Create a web site with multiple configurations that match their environments such as DEV, QA, PP, PROD and so on using the configuration manager and support for configuration transformation in VS 2010
  2. Build their web site using the correct configuration
  3. Cause the correct substitution of the correct configuration resulting in an web.config that has the correct configuration for the target environment
  4. Create a ZIP of the results, with the root of the web site as the root of the zip
  5. Give the ZIP to deployment engineering for unzipping into the web site

You would think this would be easy, but no, thanks to lots of smart people at Magenic (you could be one too!) and especially Murugesh Annadurai who finally got all the bits and pieces of MSBUILD together and made them all work!

Download a zip of the solution with documentation

Blog ID: 2012 04-17_Blog_134