简体   繁体   中英

Visual Studio 2015 Update 3 Build SQLCMD Post Deployment Script to Dacpac

In lower version of Visual Studio, we have post deployment script (Script.PostDeployment.sql) to contain a list of SQLCMD mode scripts -

:r .\LookupTableData\dbo.SQLCMD1.sql
:r .\LookupTableData\dbo.SQLCMD2.sql
:r .\LookupTableData\dbo.SQLCMD3.sql
:r .\LookupTableData\dbo.SQLCMD4.sql

In vNext TFS, how to set up task "Visual Studio Build" in a solution to contain Script.PostDeployment.sql in a database project and build it into a DACPAC file, so the lookup data can be deployed like tables, stored procedures, and others?

No, the Post Deployment script can't be included in Dacpac file, you can check this related thread.

There are many extensions in the Marketplace that include run SQL scripts task, so you can run SQL script after deploying database to your server, such as SQL Toolkit.

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