VS 2010 also supports a packaging option that enables you to
package up your ASP.NET Web Application (together with its dependencies like
web.config, databases, ACLs, etc) into a .zip based deployment package file
that Web Deploy understands. You can then hand-off the deployment package
file to someone who can deploy it either via the IIS Admin Tool, or via a
command-line/powershell script that installs it on a remote server using Web
Deploy.
The deployment package you create can optionally expose
application configuration settings that can be overridden (like directory
locations, database connection-strings, etc). When using the IIS7 Admin
Tool, the install wizard will prompt the administrator for each setting to be
customized – enabling you to provide a clean customization experience without
having to write any custom code to-do so. The settings can also be passed
as arguments on the command-line when using a command-line or Powershell script
to deploy the application via a remote Web Deploy service.
To create a web package within Visual Studio 2010, just
right click on your ASP.NET Web Project in the solution explorer and select the
“Build Deployment Package” menu item:
Selecting this option will cause VS 2010 to build a Web
Deploy compatible deployment package. You can configure where this
package is created on disk within the project’s “Properties” dialog (select the
Package/Publish Web tab). Note that the disk location of the generated
Web Deploy package is always displayed in the “Output” window build content
(which makes it easier to find):
The generated package file is literally a .zip
file that contains a Web Deploy manifest that enables you to easily deploy it
on a remote server using either the IIS Admin Tool or a command-line.