Search code examples
versioningdacpac

How to get the version number from a DACPAC file


I generate DACPAC files from automated builds with a generated version number. While useful during sqlpackager operations I need to be able to determine the version number of a DACPAC before doing anything with the file.

What tooling can I use (automated of course) to query the DACPAC file for its version number and description?


Solution

  • DACPAC files are actually zip files. Extract the zip and query the file DacMetaData which is a xml file. Use the XPath: /DacType/Version