1
votes

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?

1

1 Answers

1
votes

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