diff --git a/docs/tools/sql-database-projects/concepts/pre-post-deployment-scripts.md b/docs/tools/sql-database-projects/concepts/pre-post-deployment-scripts.md index 7a106b680fa..812b02566dc 100644 --- a/docs/tools/sql-database-projects/concepts/pre-post-deployment-scripts.md +++ b/docs/tools/sql-database-projects/concepts/pre-post-deployment-scripts.md @@ -62,6 +62,21 @@ Those files should be excluded from the database model build by setting the `Bui ``` +In SDK-style SQL projects, adding a `Build Remove="path\file.sql"` entry removes the file from the project entirely, which causes it to no longer appear in the Visual Studio Code project view. To keep the file visible while still excluding it from model compilation, add it again as a `None` item: + +```xml +... + + + + + + + +``` + +This prevents the file from being compiled as part of the database model while keeping it visible in the project. + > [!TIP] > 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.