Database Deployment and One-Click Publish for Web Applications

Database Deployment

A Visual Studio 2010 deployment package can include dependencies on SQL Server databases. As part of the package definition, you provide the connection string for your source database. When you create the Web package, Visual Studio 2010 creates SQL scripts for the database schema and optionally for the data, and then adds these to the package. You can also provide custom SQL scripts and specify the sequence in which they should run on the server. At deployment time, you provide a connection string that is appropriate for the target server; the deployment process then uses this connection string to run the scripts that create the database schema and add the data.

In addition, by using One-Click Publish, you can configure deployment to publish your database directly when the application is published to a remote shared hoster. For more information, see Database Deployment with VS 2010 on Vishal Joshi’s blog.

One-Click Publish for Web Applications

Visual Studio 2010 also lets you use the IIS remote management service to publish a Web application to a remote server. You can create a publish profile for your hosting account or for testing servers or staging servers. Each profile can save appropriate credentials securely. You can then deploy to any of the target servers with one click by using the Web One Click Publish toolbar. With Visual Studio 2010, you can also publish by using the MSBuild command line. This lets you configure your team build environment to include publishing in a continuous-integration model.

For more information, see Web 1-Click Publish with VS 2010 on Vishal Joshi’s blog. To view video presentations about Web application deployment in Visual Studio 2010, see VS 2010 for Web Developer Previews on Vishal Joshi's blog.

Posted in: database asp.net | Tags: deploy vs 2010 visual studio 2010 database deployment one-click publish