PublishDacPac
1.1.3
Publish-DacPac simplifies the use of SqlPackage.exe to deploy a DACPAC by using a DAC Publish Profile which provides for fine-grained control over the database creation and upgrades, including upgrades for schema, triggers, stored proce
Publish-DacPac simplifies the use of SqlPackage.exe to deploy a DACPAC by using a DAC Publish Profile which provides for fine-grained control over the database creation and upgrades, including upgrades for schema, triggers, stored procedures, roles, users, extended properties etc. Using a DAC Publish Profile, multiple different properties can be set to ensure that the database is created or upgraded properly.
Publish-DacPac compares the content of a DACPAC to the database already on the target server and generates a deployment script. You can tailor how publish works using a DAC Publish Profile.
To automate build and deployment of databases in Azure DevOps, you can use MsBuild to create DacPac from your Visual Studio solution. You can then add a PowerShell task which uses Publish-DacPac to invoke SQLPackage.exe to deploy each DacPac using your own custom DAC Publish Profile.
To enable Continuous Deployment scenarios, Publish-DacPac has been published as an Azure DevOps extension called Publish DacPac using a DAC Publish Profile here https://marketplace.visualstudio.com/items?itemName=DrJohnExtensions.PublishDacPac
Full documentation can be found on our project site https://github.com/DrJohnT/PublishDacPac
**What's New**
Encrypted connections for database deployment are now supported.
Minimum PowerShell version
5.0
Installation Options
Owners
Copyright
Copyright (c) 2019-2025 Dr. John Tunnicliffe. All rights reserved.
Package Details
Author(s)
- Dr. John Tunnicliffe
Tags
SSDT deployment DACPAC deploy publish SQL database DAC sqlserver Profile Azure DevOps SqlPackage powershell pipeline release data-tier on-premise automation
Functions
Find-SqlPackageLocations Get-SqlDatabasePath Get-SqlPackagePath Invoke-ExternalCommand Ping-SqlDatabase Ping-SqlServer Publish-DacPac Remove-Database
Dependencies
This module has no dependencies.
Release Notes
FileList
- PublishDacPac.nuspec
- LICENSE
- PublishDacPac.psd1
- README.md
- en-US\PublishDacPac-help.xml
- public\Get-SqlDatabasePath.ps1
- public\Invoke-ExternalCommand.ps1
- public\Ping-SqlDatabase.ps1
- public\Ping-SqlServer.ps1
- public\Publish-DacPac.ps1
- public\Remove-Database.ps1
- PublishDacPac.psm1
- en-US\about_PublishDacPac.help.txt
- public\Find-SqlPackageLocations.ps1
- public\Get-SqlPackagePath.ps1
Version History
Version | Downloads | Last updated |
---|---|---|
1.1.3 (current version) | 31 | 7/21/2025 |
1.1.1 | 23,161 | 1/11/2021 |