简体   繁体   中英

Ways to deploy SQL project to Azure SQL Database with TFS

I am building a .NET web application with SQL project. The aim is to continuously deploy to Azure.

I understand that for web application itself, it can be continuously deployed to Azure from Github, but what about the SQL database? I would like to use the Azure SQL database and get my web application talk to it.

For the Azure SQL database, I am struggling to find ways to continuously deployed with TFS. Any suggestiongs?

If you use Visual Studio Online, then you can simply build and publish SQL Database Project to an Azure SQL Database and automate the process.

In Team Explorer - Builds menu,

  1. Add New Build Definition
  2. on Process Tab, go to 5. Advanced section.
  3. Add SQL Database build argument in MSBuild arguments property. /t:Build;Publish /p:SqlPublishProfilePath=.publish.xml

This will build an publish your database. Please make sure to create a publish profile in the database project and check it in to GitHub.

To learn more, read following blog

SQL Server Database Projects and Team Foundation Build for TFS server scenario. http://blogs.msdn.com/b/ssdt/archive/2014/07/24/sql-server-database-projects-and-team-foundation-build.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM