Is there a way to programmatically get the version of a .bacpac file without unzipping and inspecting the xml?
2
votes
0
answers
399
views
The situation is that we get a copy of the latest production bacpac, then restore it locally when setting up our dev environment. During the setup, we do an explicit check for the DacFX dll but target a specific version to warn the user if they are missing the required DacFx installation.
$DacPath = "C:\Program Files\Microsoft SQL Server\130\DAC"
// ... code to check x86 path if x64 not found and throw error if none
$DacAssembly = "$DacPath\bin\Microsoft.SqlServer.Dac.dll"
We *COULD* continue to just update it as Azure updates the SQL instance, but I feel there's probably a more sane way to check the export version of the bacpac. This would allow us to automatically roll forward our version check as it increases.
Failed, my google-fu has...
Asked by Doc Rinehart
(21 rep)
Jun 14, 2018, 03:25 PM
Last activity: Jun 14, 2018, 03:54 PM
Last activity: Jun 14, 2018, 03:54 PM