BuildPackage with PreDeployment and PostDeployment Scripts
- Dominant language
- C#
- Stars
- 460
- Forks
- 29
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 7
Description
If a dacpac is loaded, updated and saved the PreDeployment and PostDeployment scripts are lost, since https://docs.microsoft.com/en-us/dotnet/api/microsoft.sqlserver.dac.dacpackageextensions.buildpackage?view=sql-dacfx-150 lacks a parameter for these scripts.
https://docs.microsoft.com/en-us/dotnet/api/microsoft.sqlserver.dac.dacpackage?view=sql-dacfx-150 has properties to read and write scripts, but it lacks a Save method.
So you can load, update and deploy a dacpac but cannot save it.
It would be best to have Save method in the DacPackage class. For some reason there is none, but a DacPackageExtensions.BuildPackage method. Alternatively this method could be extended.
Contributor guide
Research direction
Start by reviewing the DacPackage and DacPackageExtensions.BuildPackage API documentation linked in the issue, focusing on how package scripts are read, written, and persisted. Done means a loaded and updated dacpac can be saved without losing its PreDeployment and PostDeployment scripts, either through DacPackage or an extended BuildPackage API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, sql
- Domain
- databases, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100