Can a Visual Studio 2015 database project publish and SQL Server _and_ Azure?

I have a solution that should focus on both SQL Server 2014 and the Microsoft Azure SQL V12 database.

In the settings of my project, if I installed the target Azure platform, I can not publish it to SQL Server - I get this error:

A project that defines Microsoft Azure SQL Database v12 as a target platform cannot be published to SQL Server 2014.

If I installed the target SQL Server 2014 platform and try to publish it to the Azure database, I get the opposite error.

Is there a way to publish on both platforms without having to change project settings each time?

Please note that I am not trying to migrate. I need to support both database options using my scripts.

+4
source share
1 answer

When deploying, you can use the AllowIncompatiblePlatform flag, which should expand it.

I use Azure V12 and Local Db Sql 2016, and it publishes a local db instance without a flag, so maybe something has changed in this version or in the latest ssdt.

+6
source

All Articles