The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql160DatabaseSchemaProvider is not valid

201 Views Asked by At

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.

1

There are 1 best solutions below

1
Balaji On

The error occurs due to the use of an older version of ssms. As Thom suggests, updating the ssms version resolves the issue as you can see below:

After updating the ssms version, follow these steps to deploy a dacpac file generated by Visual Studio to Azure SQL Database:

  • Create a database and a table in Visual Studio enter image description here

  • After creating the table build your project or click ctrl + shift + B to create a dacpac file. enter image description here

  • I have updated ssms to version 19.2 and connects it to Azure SQL Server and navigate to the Object Explorer window. Right-click on Databases and select Deploy Data-tier Application.

  • Click Select package and navigate to the location where your DACPAC file is stored.

  • Click on Next to select the target database where you want to deploy the DACPAC.

  • Then the dacpac file will be successfully deployed to the Azure SQL Server as shown below. enter image description hereenter image description here