I am using self Hosted Agent (Windows 2019) with SQL Server 2019 in Azure DevOps. I am using "SQL Server database deploy" Task. And trying to deploy a dacpac with the database project created using VS2019. I am getting an error as
"Could not deploy package. Unable to connect to master or target server. You must have a user with the same password in master or target server."
When I check the task log, SQLPackage.exe was executed from the below path.
"C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\SqlPackage.exe"
But DAC folder is missing in the below path
"C:\Program Files (x86)\Microsoft SQL Server\150"
When I check the capabilities of agent pool, it showing the path of SQLPackage as
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\140\SQLPackage.exe".
But SQLPackage.exe is also available in the below path
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\150"
Some links says it was known issue. And some links suggest to use Powershell task instead of "SQL Server database deploy" Task.
Please anyone let me know how to fix this issue.