1

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.

1 Answer 1

1

Modern versions of DacFramework.msi note the install location in the registry under HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\Data-Tier Application Framework\InstallLocation.

However, it would be better to include the DacFramework assemblies in your installer and call that code. The Data-Tier Application Framework is licensed by Microsoft as "redistributable" code.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for that Steve! Couldnt get the Install Location folder for 2014 and 2016 on our machines using HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\Data-Tier Application Framework\InstallLocation. I see a DACFramework under Microsoft SQL Server, but it doesnt have an Install Location
For the x86 (32-bit) version of DacFramework.msi you can check HKLM\SOFTWARE\WOW6432Node\Microsoft\Microsoft SQL Server\Data-Tier Application Framework\InstallLocation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.