使用 powershell 修改 DacPac

Modify DacPac Using powershell

我需要使用 powershell 读取现有的 dacpac 并更改模式,然后复制数据库。有没有可能使用“System.Reflection

有一个完整的 public API 支持加载 dacpacs、读取内容(架构中的表、视图等),并在保存之前添加/更新这些内容。示例项目位于 https://github.com/Microsoft/DACExtensions, with a tutorial explaining core concepts here. There are a number of additional examples, such as Ed Elliott's blog 和开源贡献,可以帮助您了解要做什么。

披露:我在 DacFx 团队工作并编写了链接教程。