'C# DacFx package and querying out list of SQLCMD Variables from DACPAC
Is it possible using the Microsoft.SqlServer.DacFx.x64 nuget package to query out the list of SQLCMD Variables from a dacpac file?
Thank you,
Solution 1:[1]
Since there is not much activity here: don't know if DacFx can do this, however DACPAC file is a ZIP archive containing model.xml which is the whole body of SSDT project. Unzipping and extracting values can be automated.
SqlCmdVariables in this XML file look like shown below:

XPath would be //Header/CustomData[@Category='SqlCmdVariables']/Metadata/@Name
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ivan Starostin |
