VS 2005 Web Deployment Project

Out of the box, deploying ASP.NET 2.0 applications sucks. Plain and simple. The whole mess of creating separate assemblies for each folder within your site structure was a dumb decision. And when you rebuild your web app, brand new assemblies are created for you all over again (with different names to boot), thus complicating XCOPY deployment to the point of pulling your hair out. Not sure where Microsoft got the feedback that that was a good idea, but at least they've been listening to the post-RTM feedback and have made amends with the VS 2005 Web Deployment Project.

The VS 2005 WDP is nice because it allows you to actually build your ASP.NET 2.0 web app into a single assembly (gasp!), and it also gives you a few other options, such as:

  • Being able to remove the App_Data folder
  • Being able to remove the App_Code.compiled file
  • Create an IIS virtual directory for the output folder

But probably the best option is the ability to replace sections in your web.config during the build. For instance I use NHibernate for CodeKeep, and of course the connection string to my local database is different than the one at my hosting provider, DiscountASP. Instead of editing web.config every time I deploy changes to DiscountASP (and changing back again when developing), I simply setup a config section replacement that swaps out the NHibernate section in web.config with a NHibernate section defined in some other file. It's very handy and I can attest that it does work as expected.

Pre-release versions of WDP were sketchy at best (as in, never worked for me), but I'm happy to report all is well with the final release. For more info, see Scott Guthrie's detailed post about it.

Print | posted on Saturday, February 18, 2006 9:51 PM
Comments have been closed on this topic.