A project which specifies SQL Server 2022 or Azure SQL Database Managed Instance as the target platform cannot be published to Microsoft Azure SQL Database v12.

While deploying a DACPAC project to Azure SQL database using Azure DevOps, you may come across ‘A project which specifies SQL Server 2022 as the target platform cannot be published to Azure SQL Database v12.’ error. In this article, we will see how to fix this issue.

Error

##[error]*** An error occurred during deployment plan generation. Deployment cannot continue.
##[error]A project which specifies SQL Server 2022 or Azure SQL Database Managed Instance as the target platform cannot be published to Microsoft Azure SQL Database v12.
##[error]The Azure SQL DACPAC task failed. SqlPackage.exe exited with code 1.Check out how to troubleshoot failures at https://aka.ms/sqlazuredeployreadme#troubleshooting-

a project which specifies sql server 2022 as the target platform cannot be published to azure.

Solution

1. Open the database dacpac project in Visual Studio.

2. Right Click on the database project and Click on ‘Properties’.

3. Open ‘Target platform’ drop down and select ‘Microsoft Azure SQL Database’.

4. Save the project and build it.

5. If the build is successful, raise a PR to merge this change with main branch and initiate the Azure DevOps CICD pipeline.

See more

Pro tips:
1. Follow the steps mentioned in the article deploy azure sql database using devops to automate Azure SQL database deployments.

Kunal Rathi

With over 13 years of experience in data engineering and analytics, I've assisted countless clients in gaining valuable insights from their data. As a dedicated supporter of Data, Cloud and DevOps, I'm excited to connect with individuals who share my passion for this field. If my work resonates with you, we can talk and collaborate.

Shopping Cart
Scroll to Top