I'm trying to deploy to Azure SQL Database a dacpac generated by a Visual Studio build output file. I'm using Microsoft SQL Server Management Studio 18 and SQL Sever 2022.
This is the error I get.
Could not deploy package. (Microsoft.SqlServer.Dac)
Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql160DatabaseSchemaProvider is not valid. You must make sure the service is loaded, or you must provide the full type name of a valid database platform service. (Microsoft.Data.Tools.Schema.Sql)
The target platform of the SQL Project is SQL Server 2022 or Azure SQL Managed Instanced.
I couldn't find any solution.
I tried changing different compatibility levels, looked at the Microsoft docs and read a lot of stack overflow questions similar to this one.
The error occurs due to the use of an older version of
ssms. As Thom suggests, updating thessmsversion resolves the issue as you can see below:After updating the
ssmsversion, follow these steps to deploy adacpacfile generated by Visual Studio to Azure SQL Database:Create a database and a table in
Visual StudioAfter creating the table build your project or click
ctrl + shift + Bto create adacpacfile.I have updated
ssmsto version 19.2 and connects it to Azure SQL Server and navigate to the Object Explorer window. Right-click on Databases and selectDeploy Data-tier Application.Click
Select packageand navigate to the location where your DACPAC file is stored.Click on
Nextto select the target database where you want to deploy the DACPAC.Then the

dacpacfile will be successfully deployed to the Azure SQL Server as shown below.