Skip to content

Commit be19fcc

Browse files
authored
Correct extra script contents info (#33787)
1 parent 78d7c22 commit be19fcc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/tools/sql-database-projects/concepts/pre-post-deployment-scripts.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Multiple files can be executed as part of a pre- or post-deployment script by us
5151
:r .\scripts\script2.sql
5252
```
5353

54-
Those files should be excluded from the database model build by setting the `Build Action` property to `None` in the file properties in Visual Studio or by adding an entry for the file in the `.sqlproj` file with the `Build` attribute set to `None`.
54+
Those files should be excluded from the database model build by setting the `Build Action` property to `Remove` in the file properties in Visual Studio or by adding an entry for the file in the `.sqlproj` file with the `Build` attribute set to `Remove`. When the SQL project is built, the additional files are combined into their referencing pre-deployment or post-deployment script in the `.dacpac` by the Microsoft.Build.Sql project SDK.
5555

5656
```xml
5757
...
@@ -62,6 +62,9 @@ Those files should be excluded from the database model build by setting the `Bui
6262
</Project>
6363
```
6464

65+
> [!TIP]
66+
> You can validate the pre-deployment and post-deployment scripts after project build, by changing the `.dacpac` file extension to `.zip` and unarchiving the `.zip` to a folder. A single `.sql` file is present for pre-deployment and post-deployment scripts, and should contain the entire Transact-SQL contents of all referenced files in the originating SQL project.
67+
6568
## Add pre- and post-deployment scripts
6669

6770
::: zone pivot="sq1-visual-studio"

0 commit comments

Comments
 (0)