I'm invoking DacServices APIs to deploy DACPACs, which requires an assembly reference of Microsoft.SqlServer.Dac. The target machine on which i run my installer could have SSDT/SQL installed on D drive or maybe a higher version of SQLServer could be installed.
How do i dynamically get the Microsoft.SqlServer.Dac assembly file path on target machine when using DacServices to deploy (We'd have the same issue if we were to use SqlPackage.exe since I need to dynamically find out the 120/DAC/bin or 130/DAC/bin folder on the target where i run my installer)?
Or if anyone can suggest any other solution to this issue so that the same exe can work of different machines/environments, that would be great.