December 24, 2012

A project which specifies SQL Server 2012 as the target platform cannot be published to SQL Server 2008

Executing the Schema Compare in Visual Studio 2012, I get the error message "A project which specifies SQL Server 2012 as the target platform cannot be published to SQL Server 2008."


This error occurs because in Visual Studio 2012 the target platform of the database project is by default set to SQL Server 2012 and your database to be compared does not match the setting. If your target database is SQL Server 2008 like me for example, you can follow the below steps to change the target platform.
  1. Right-click on the project name in Solution Explorer and click Properties.
  2. Click the Project Settings tab.
  3. Change the target platform from SQL Server 2012 to SQL Server 2008.
  4. Save the project and execute the Schema Compare function again.

No comments: