Currently web deployment in ASP.NET isn’t an easy task - there’s a small laundry list of things to do, and if you forget to deploy something or incorrectly configure something then boom! errors! Nobody wants to deploy a site and have to fight with it for the next two hours trying to figure out what was forgotten or set incorrectly while customers sit awaiting. In VS 2010, we are going to see some major changes with deployment, including a new publishing pipeline and lots of features built right into the product to help us deploy our apps successfully and painlessly.
The Way Things Are
Today, most developers need to deploy at least some of the following items:
- Files & Resources
- Web Server Settings
- Web Content
- Configuration Settings
- GAC
- COM/Registry
- Certs & Security Settings (ACLS)
- Data Schema/Data Changes
What usually happens is the developer will deploy the content and \bin folder contents, run some .sql scripts, update some config changes and then test out the production site. The site usually produces errors at this point in time and then the developer makes several mad dashes back and forth (sometimes using sneaker net) to play catch up, make changes and try to get both the dev/test box and the production box in sync. Often, something is just left out.
Things have been this way for some time, and deployment has never been something that Microsoft has really put much thought into, until now.
The New Deployment Experience
The VS team at Microsoft has realized that easy deployment is a huge issue for many developers and have been taking a hard look at what they can do to ease our pain. Enter, Visual Studio 2010 WPP (Web Publishing Pipeline). The WPP takes advantage of current tools like MSBuild and MSDeploy and adds in new features to create a process for smooth packaging and deployment. These features are built into Visual Studio 2010 and all the developer needs to do is open the project settings, move to the Publish tab, set a few settings and create a deployment package.
The options available to you are:
- What you want to deploy, files, App_Data, debug symbols, etc…
- Pre-compilation settings
- GAC, COM, IIS and Registry Synchronization
- Package path, IIS path, etc…
All you need to do is click the Create Package button and all the settings will be reproduced. Files, resources and the like will get rolled into your package (a .zip file or folder). You can then copy and unzip the .zip file that has been created at your target location and you’re done with deployment. The deployment team also has plans to add support for deploying and synchronizing database schema, and a few other goodies up their sleeve as well, which I will be posting on at a later time.
